52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:15
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
ports:
|
|
- 0.0.0.0:5432:5432
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- effective_mobile_test_go_api
|
|
|
|
# migrate:
|
|
# image: migrate/migrate:v4.15.1
|
|
# command: -path=/migrations -database postgresql://postgres:postgres@postgres:5432/postgres?sslmode=disable up
|
|
# volumes:
|
|
# - ./migrations:/migrations
|
|
# depends_on:
|
|
# - postgres
|
|
|
|
app:
|
|
build: .
|
|
depends_on:
|
|
# - migrate
|
|
- postgres
|
|
env_file:
|
|
./.env.docker
|
|
ports:
|
|
- 0.0.0.0:8080:8080
|
|
# environment:
|
|
# - SERVER_PORT=8080
|
|
# - DB_HOST=postgres
|
|
# - DB_PORT=5432
|
|
# - DB_USER=postgres
|
|
# - DB_PASSWORD=postgres
|
|
# - DB_NAME=effective_mobile_test_go_api
|
|
volumes:
|
|
- ./.env.docker:/app/.env
|
|
- ./migrations:/app/migrations
|
|
networks:
|
|
- effective_mobile_test_go_api
|
|
|
|
volumes:
|
|
postgres_data:
|
|
|
|
networks:
|
|
effective_mobile_test_go_api:
|
|
driver: bridge
|