forked from chimmykk/NAMADA-DONOR-DROP
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
25 lines (23 loc) · 1001 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
services:
db:
image: postgres:latest
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- "5434:5432" # Optional, expose PostgreSQL to external systems if needed
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-scripts:/docker-entrypoint-initdb.d
networks: # comment this section out if you're hosting the frontend on the same machine
# In order for the backend to communicate with the frontend, we need a network.
# Make sure this points to the same in the frontend's docker-compose.yml file.
# This network should be an existing one or created via `docker network create your_shared_network`.
- your_shared_network
volumes:
postgres_data:
networks: # comment this section out if you're hosting the frontend on the same machine
your_shared_network: # Do not forget to rename it here as well
external: true