40 lines
768 B
YAML
40 lines
768 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: docker.io/library/postgres:13
|
|
container_name: postgres
|
|
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- ./database/init:/docker-entrypoint-initdb.d
|
|
networks:
|
|
- app-network
|
|
app:
|
|
container_name: app
|
|
build: .
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
- postgres
|
|
env_file:
|
|
- .env
|
|
networks:
|
|
- app-network
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|
|
|
|
# environment:
|
|
# - DB_HOST=${DB_HOST}
|
|
# - DB_USER=${POSTGRES_USER}
|
|
# - DB_PASSWORD=${POSTGRES_PASSWORD}
|
|
# - DB_NAME=${POSTGRES_DB}
|