-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (60 loc) · 1.49 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
version: '3.3'
services:
postgres:
container_name: postgres
image: postgres
restart: always
environment:
POSTGRES_USER: admin@111
POSTGRES_PASSWORD: admin@111
POSTGRES_DB: maindb
ports:
- "5432:5432"
networks:
- main-network
api:
container_name: api
image: node:18.16.0
depends_on:
- postgres
command:
- sh
- -c
- "cd /usr/src/api && npm install && npx nx run org.core.api-generator:serve:development"
env_file:
- ./api-gen-no-code/.env
environment:
- PATH=/usr/src/api/node_modules/.bin:$PATH
- DATABASE_HOST_NAME=postgres
- DATABASE_PORT=5432
- DATABASE_USERNAME=admin@111
- DATABASE_PASSWORD=x
- DATABASE_SCHEMA=maindb
- DATABASE_TYPE=postgres
- SERVER_SECRET_KEY=kqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCS9
volumes:
- ./api-gen-no-code:/usr/src/api
- ./api-gen-no-code/node_modules:/usr/src/api/node_modules
ports:
- 3000:3000
networks:
- main-network
web:
container_name: web
image: node:18.16.0
environment:
- PATH=/usr/src/web/node_modules/.bin:$PATH
command:
- sh
- -c
- "cd /usr/src/web && npm install && ng serve --host 0.0.0.0 --port 4200"
volumes:
- ./web-gen-no-code:/usr/src/web
- ./web-gen-no-code/node_modules:/usr/src/web/node_modules
ports:
- 4200:4200
networks:
- main-network
networks:
main-network:
driver: bridge