-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.prod.yml
86 lines (80 loc) · 1.94 KB
/
docker-compose.prod.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: '2.4'
services:
db:
image: 'postgres'
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
healthcheck:
test: pg_isready -U postgres
interval: 10s
timeout: 5s
retries: 5
db-migrations:
image: c3pm/back/prod
build:
context: back
dockerfile: prod.Dockerfile
environment:
DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres
volumes:
- ./back:/home/node/app
- back-node_modules:/home/node/app/node_modules
command: npx prisma migrate deploy --preview-feature
depends_on:
db:
condition: service_healthy
localstack:
image: 'localstack/localstack'
ports:
- 4566:4566
healthcheck:
test: awslocal s3 ls
interval: 10s
timeout: 5s
retries: 5
environment:
REGISTRY_BUCKET_NAME: registry-c3pm-io
SERVICES: s3
volumes:
- ./scripts/localstack:/docker-entrypoint-initaws.d
back:
image: c3pm/back/prod
build:
context: back
dockerfile: prod.Dockerfile
ports:
- 4000:4000
environment:
DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres
PORT: 4000
ALLOWED_ORIGIN: http://localhost:3000
SESSION_SECRET: toto
FRONTEND_URL: http://localhost:3000
REGISTRY_BUCKET_NAME: registry-c3pm-io
REGISTRY_SECRET: secret
REGISTRY_KEY: key
REGISTRY_URL: http://localstack:4566
volumes:
- back-node_modules:/home/node/app/node_modules
depends_on:
localstack:
condition: service_healthy
db:
condition: service_healthy
db-migrations:
condition: service_started
front:
image: c3pm/front/prod
build:
context: front
dockerfile: prod.Dockerfile
ports:
- 3000:3000
volumes:
- front-node_modules:/home/node/app/node_modules
volumes:
back-node_modules:
front-node_modules: