-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
59 lines (54 loc) · 1.14 KB
/
docker-compose.yaml
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
56
57
58
59
services:
database:
image: 'postgres:15-alpine'
container_name: database
ports:
- 5432:5432
volumes:
- database_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U $POSTGRES_USER']
interval: 5s
timeout: 5s
retries: 5
networks:
- backstage
backstage:
build: .
container_name: backstage
ports:
- 7007:7007
- 3000:3000
depends_on:
database:
condition: service_healthy
env_file:
- .env
volumes:
- ./:/usr/src/app
environment:
POSTGRES_HOST: database
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
networks:
- backstage
pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin
restart: always
depends_on:
- database
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- 8081:80
networks:
- backstage
volumes:
database_data: {}
networks:
backstage: