forked from Hi-Transcendence/ft_transcendence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
61 lines (55 loc) · 1.19 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
version: '3.3'
services:
postgres-db:
image: postgres:14-alpine
container_name: postgres-db
restart: always
networks:
- private-network
ports:
- 5432:5432
volumes:
- ./back/server/backup-db:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
nest-server:
image: node:16-alpine
container_name: nest-server
restart: always
networks:
- private-network
ports:
- 3000:3000
volumes:
- ./back/server/:/nest
working_dir: /nest
entrypoint: sh -c
command:
- |
apk update
apk upgrade
apk add openssl
openssl ${SSL_ALGO} \
-keyout private-key.pem \
-out public-certificate.pem \
${SSL_INFO}
npm i
npm run start
depends_on:
- postgres-db
react-client:
image: node:16-alpine
container_name: react-client
restart: always
networks:
- private-network
ports:
- 3001:3001
volumes:
- ./front/client:/react
working_dir: /react
command: sh -c "npm i && npm start"
networks:
private-network: