36 lines
649 B
YAML
36 lines
649 B
YAML
services:
|
|
|
|
db:
|
|
image: postgres:16
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "${DB_PORT}:${DB_PORT}"
|
|
volumes:
|
|
- postgres-db:/var/lib/postgresql/data
|
|
|
|
|
|
api:
|
|
build:
|
|
context: ./api
|
|
dockerfile: Dockerfile
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "${SERVER_PORT}:${SERVER_PORT}"
|
|
volumes:
|
|
- .:/usr/src/app
|
|
depends_on:
|
|
- db
|
|
command: ./bin/api.exe
|
|
|
|
migrator:
|
|
build: ./migrator
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "${MIGRATOR_PORT}:${MIGRATOR_PORT}"
|
|
command: "goose -dir ./migratios postgres 'user=postgres dbname=postgres sslmode=disable' up"
|
|
|
|
volumes:
|
|
postgres-db: |