-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
68 lines (61 loc) · 1.46 KB
/
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
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
60
61
62
63
64
65
66
67
68
services:
frontend:
depends_on:
- server
build:
context: ./web-client
dockerfile: Dockerfile
ports:
- 8080:8080
server:
depends_on:
- db
build:
context: ./web-server
dockerfile: Dockerfile
ports:
- 3000:3000
- 5555:5555
db:
image: postgres:16
restart: unless-stopped
# Uncomment the following line to enable query logging
# Then restart the container.
# command: ['postgres', '-c', 'log_statement=all']
environment:
- POSTGRES_DB=mydb
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=admin
ports:
- '15432:5432'
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
# specifying user and database is needed to avoid `FATAL: role "root" does not exist`
# spam in the logs
test: ['CMD', 'pg_isready', '-U', 'prisma', '-d', 'tests']
interval: 5s
timeout: 2s
retries: 20
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
depends_on:
- db
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- pgadmin:/var/lib/pgadmin
ports:
- "${PGADMIN_PORT:-5050}:80"
networks:
- postgres
restart: unless-stopped
networks:
postgres:
driver: bridge
volumes:
postgres:
pgadmin: