-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (50 loc) · 1.19 KB
/
docker-compose.yml
File metadata and controls
55 lines (50 loc) · 1.19 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
services:
postgres:
image: postgres:16
container_name: gridpulse-postgres
environment:
POSTGRES_DB: gridpulse_cloud
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- backend-net
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER}" ]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
backend:
build: ./backend
image: gridpulse-backend
container_name: gridpulse-backend
depends_on:
postgres:
condition: service_healthy
env_file:
- backend/.env.docker
ports:
- "8080:8080"
networks:
- backend-net
restart: unless-stopped
frontend:
build: ./frontend
image: gridpulse-frontend
container_name: gridpulse-frontend
ports:
- "3000:80"
depends_on:
backend:
condition: service_started
networks:
- backend-net
volumes: # Volumes are persistent storage for containers
pgdata:
networks:
backend-net: # name of the network the containers will be able to communicate with each other within
driver: bridge