Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
fix #108: refactor Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilsk committed Oct 17, 2018
1 parent 75ad129 commit 25e4f62
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
3 changes: 2 additions & 1 deletion env/docker-compose.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
COMPOSE ?= docker-compose -f env/docker-compose.base.yml -f env/docker-compose.dev.yml -p forma
_base = docker-compose -p forma -f env/docker/compose/docker-compose.base.yml
COMPOSE = $(_base) -f env/docker/compose/docker-compose.dev.yml


.PHONY: __env__
Expand Down
2 changes: 1 addition & 1 deletion env/docker.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IMAGE_VERSION := 2.x
IMAGE_VERSION := 3.x
PACKAGE := github.com/kamilsk/form-api


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ services:
env_file: .env

migration:
image: kamilsk/form-api:2.x # https://hub.docker.com/r/kamilsk/form-api/
command: [ "migrate", "up" ]
image: kamilsk/form-api:3.x # https://hub.docker.com/r/kamilsk/form-api/
command: [ "migrate" ]
depends_on:
- db
env_file: .env
restart: on-failure

service:
image: kamilsk/form-api:2.x # https://hub.docker.com/r/kamilsk/form-api/
image: kamilsk/form-api:3.x # https://hub.docker.com/r/kamilsk/form-api/
command: [ "run", "--with-profiling", "--with-monitoring" ]
depends_on:
- migration
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: "3"

services:

db:
ports:
- ${LOCAL_DB_PORT}:5432
Expand All @@ -10,14 +11,14 @@ services:
migration:
build:
args: { PACKAGE: "${PACKAGE}" }
context: ../.
dockerfile: ./env/Dockerfile
context: ../../../.
dockerfile: ./env/docker/service/Dockerfile

service:
build:
args: { PACKAGE: "${PACKAGE}" }
context: ../.
dockerfile: ./env/Dockerfile
context: ../../../.
dockerfile: ./env/docker/service/Dockerfile
ports:
- ${LOCAL_SERVICE_HTTP_PORT}:80
- ${LOCAL_SERVICE_PROFILING_PORT}:8090
Expand All @@ -36,10 +37,8 @@ services:
- letsencrypt:/etc/letsencrypt

volumes:
pgdata:
driver: local

certificates:
driver: local
letsencrypt:
driver: local
pgdata: { driver: local }

certificates: { driver: local }
letsencrypt: { driver: local }
2 changes: 1 addition & 1 deletion env/Dockerfile → env/docker/service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ EXPOSE ${HTTP_PORT} \
${GRPC_PORT}

ENTRYPOINT [ "service" ]
CMD [ "run" ]
CMD [ "help", "run" ]

0 comments on commit 25e4f62

Please sign in to comment.