49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: ./docker/Dockerfile
|
|
container_name: ${APP_NAME:-go-gin-clean-starter}-app
|
|
volumes:
|
|
- .:/app
|
|
ports:
|
|
- ${GOLANG_PORT:-8888}:8888
|
|
networks:
|
|
- app-network
|
|
|
|
nginx:
|
|
image: nginx:latest
|
|
container_name: ${APP_NAME:-go-gin-clean-starter}-nginx
|
|
ports:
|
|
- ${NGINX_PORT:-81}:80
|
|
volumes:
|
|
- .:/var/www/html
|
|
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
|
|
depends_on:
|
|
- app
|
|
networks:
|
|
- app-network
|
|
|
|
postgres:
|
|
hostname: postgres
|
|
container_name: ${APP_NAME:-go-gin-clean-starter}-db
|
|
image: postgres:latest
|
|
ports:
|
|
- 15432:5432
|
|
volumes:
|
|
- ./docker/postgresql/tmp:/var/lib/postgresql/data
|
|
- app-data:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_USER=${DB_USER}
|
|
- POSTGRES_PASSWORD=${DB_PASS}
|
|
- POSTGRES_DB=${DB_NAME}
|
|
networks:
|
|
- app-network
|
|
|
|
volumes:
|
|
app-data:
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|