-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM einstore/swift:5.1-bionic as builder | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
|
||
ARG CONFIGURATION="release" | ||
|
||
RUN swift build --configuration ${CONFIGURATION} --product systemator | ||
|
||
# ------------------------------------------------------------------------------ | ||
|
||
FROM einstore/swift:5.1-bionic | ||
|
||
ARG CONFIGURATION="release" | ||
|
||
WORKDIR /app | ||
COPY --from=builder /app/.build/${CONFIGURATION}/systemator /app | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["/app/systemator"] | ||
CMD ["serve", "--hostname", "0.0.0.0", "--port", "8080"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
REPO = einstore | ||
IMAGE = systemator | ||
TAG = 2.1 | ||
|
||
DEBUG_TAG = local-dev | ||
|
||
help: ## Display this help | ||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-13s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST) | ||
|
||
run: debug ## Build & run local dev | ||
docker run -p 8080:8080 $(REPO)/$(IMAGE):$(DEBUG_TAG) | ||
|
||
debug: ## Build docker image in debug mode | ||
docker build --build-arg CONFIGURATION="debug" -t $(REPO)/$(IMAGE):$(DEBUG_TAG) . | ||
|
||
build: ## Release build | ||
docker build -t $(REPO)/$(IMAGE):$(TAG) . | ||
|
||
publish: build ## Publish on docker hub | ||
docker tag $(REPO)/$(IMAGE):$(TAG) $(REPO)/$(IMAGE):latest | ||
docker push $(REPO)/$(IMAGE):$(TAG) | ||
docker push $(REPO)/$(IMAGE):latest |