Skip to content

Commit

Permalink
Add network and app env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
barcellos-pedro committed Feb 8, 2024
1 parent af3659c commit 3948191
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,25 @@ version: '3.8'
volumes:
pgdata:

networks:
rest-network:
driver: bridge

services:
app:
container_name: app
build: .
ports:
- "8080:8080"
networks:
- rest-network
environment:
- DB_URL=${DB_URL}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
- PGADMIN_MAIL=${PGADMIN_MAIL}
- PGADMIN_PASSWORD=${PGADMIN_PASSWORD}
depends_on:
postgres:
condition: service_healthy
Expand All @@ -23,6 +36,8 @@ services:
ports:
- "5432:5432"
restart: always
networks:
- rest-network
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
Expand All @@ -35,6 +50,8 @@ services:
container_name: pgadmin
image: dpage/pgadmin4:8.2
restart: always
networks:
- rest-network
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_MAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PASSWORD}
Expand Down

0 comments on commit 3948191

Please sign in to comment.