Files
tp/docker-compose.yaml
T
2024-12-05 22:49:33 +05:00

59 lines
977 B
YAML

services:
db:
image: postgres:16
env_file:
- .env
ports:
- "${PGPORT}:${PGPORT}"
volumes:
- postgres-db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${PGUSER}
- POSTGRES_PASSWORD=${PGPASSWORD}
- POSTGRES_DB=${PGDATABASE}
api:
build:
context: ./api
dockerfile: Dockerfile
env_file:
- .env
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
volumes:
- api:/usr/src/app
depends_on:
- db
command: ./bin/api.exe
migrator:
build:
context: ./migrator
dockerfile: Dockerfile
env_file:
- .env
depends_on:
- api
- db
volumes:
- goose:/migrations
command: goose up
spa:
build:
context: ./spa
dockerfile: Dockerfile
env_file:
- .env
ports:
- "${OUTERPORT}:${INNERPORT}"
depends_on:
- api
- db
- migrator
volumes:
api:
postgres-db:
goose: