-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (42 loc) · 965 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (42 loc) · 965 Bytes
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
networks:
graphql-network:
driver: bridge
volumes:
postgres-data:
redis-data:
services:
graphql-redis:
image: redis:7
container_name: graphql-redis
networks:
- graphql-network
graphql-db:
image: postgres:15
container_name: graphql-db
restart: always
environment:
POSTGRES_USER: graphql
POSTGRES_PASSWORD: secret-password-xjectro:D
POSTGRES_DB: graphql
ports:
- "5432:5432"
networks:
- graphql-network
graphql:
container_name: graphql
depends_on:
- graphql-db
- graphql-redis
build:
context: .
dockerfile: Dockerfile
ports:
- "4000:4000"
env_file:
- .env
networks:
- graphql-network
command: sh -c "
until pg_isready -h graphql-db -p 5432; do echo 'waiting for postgres...'; sleep 1; done && \
pnpm db:reset && pnpm db:migrate && pnpm db:generate && \
pnpm run build && pnpm run start"