-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (79 loc) · 1.86 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '3.8'
services:
nestjs:
build:
context: .
dockerfile: ./apps/nestjs/Dockerfile
container_name: nestjs
env_file: .env
environment:
- HOST_NAME=${HOST_NAME}
init: true # Ensures quick shutdown by sending SIGTERM to child processes
restart: on-failure
ports:
- "4242:4242"
volumes:
- shared_src:/nestjs
depends_on:
- react
- db # Ensures that the database service is started before this service
react:
build:
context: .
dockerfile: ./apps/react/Dockerfile
container_name: react
env_file: .env
environment:
- CHOKIDAR_USEPOLLING=true
- HOST_NAME=${HOST_NAME}
- NEXT_PUBLIC_HOST_NAME=${HOST_NAME}
init: true
restart: on-failure
ports:
- "2424:2424"
volumes:
- shared_src:/usr/src/app
stdin_open: true
nginx:
image: nginx:latest
restart: always
container_name: nginx
ports:
- "4433:80"
volumes:
- ./apps/nginx/nginx.conf.template:/etc/nginx/nginx.conf.template
environment:
- HOST_NAME=${HOST_NAME}
depends_on:
- nestjs
- react
entrypoint: /bin/bash \-c "envsubst '$$HOST\_NAME' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'"
db:
image: postgres:16
restart: always
environment:
- POSTGRES_PASSWORD=postgres
container_name: postgres
volumes:
- ./pgdata:/var/lib/postgresql/data
ports:
- '5432:5432'
pgadmin:
image: dpage/pgadmin4
restart: always
container_name: pgadmin
environment:
- PGADMIN_DEFAULT_PASSWORD=newpassword
ports:
- '5050:80'
depends_on:
- db
volumes:
shared_src:
driver: local
driver_opts:
type: none
o: bind
device: .
db_volume: