-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
130 lines (122 loc) · 2.97 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
services:
redis:
networks:
- redis-network
command:
- redis-server
- "--appendonly"
- "yes"
- "--requirepass ${REDIS_PASSWORD}"
image: redis
container_name: resonate-redis
restart: always
expose:
- 6379
ports:
- "${REDIS_HOST_PORT:-6379}:${REDIS_PORT:-6379}"
api:
networks:
- api-network
- redis-network
env_file:
- .env
build: .
command: /bin/sh -c "yarn && yarn migrate && yarn start:dev"
container_name: resonate-api
environment:
- NODE_ENV=${NODE_ENV:-development}
depends_on:
- redis
- pgsql
ports:
- "${APP_HOST_PORT:-4000}:4000"
restart: always
volumes:
- ~/.ssh:/root/.ssh
- ./:/var/www/api
- ${MEDIA_LOCATION:-./data/media/}ultimatemember:/data/ultimatemember
- ${MEDIA_LOCATION:-./data/media/}incoming:/data/media/incoming
- ${MEDIA_LOCATION:-./data/media/}audio:/data/media/audio
- ${MEDIA_LOCATION:-./data/media/}images:/data/media/images
background:
networks:
- api-network
- redis-network
env_file:
- .env
build: background
# command: /bin/sh -c "yarn && yarn migrate && yarn start:dev"
container_name: resonate-background
environment:
- NODE_ENV=${NODE_ENV:-development}
depends_on:
- redis
- pgsql
- api
restart: always
volumes:
- ~/.ssh:/root/.ssh
- ./:/var/www/api
- ${MEDIA_LOCATION:-./data/media/}incoming:/data/media/incoming
- ${MEDIA_LOCATION:-./data/media/}audio:/data/media/audio
- ${MEDIA_LOCATION:-./data/media/}images:/data/media/images
pgsql:
image: postgres:14-alpine
env_file:
- .env
volumes:
- ./data/pgsql:/var/lib/postgresql/data
- ./data/pgsql_backups:/backups
container_name: resonate-pgsql
networks:
api-network:
aliases:
- pgsql
ports:
- '${POSTGRES_LOCAL_MACHINE_PORT:-5432}:5432'
nginx:
restart: always
container_name: resonate-nginx
networks:
- api-network
volumes:
- ./data/web-root:/var/www/html
- ./data/certbot-etc:/etc/letsencrypt
- ./data/certbot-var:/var/lib/letsencrypt
- ${MEDIA_LOCATION:-./data/media/}incoming:/data/media/incoming
- ${MEDIA_LOCATION:-./data/media/}audio:/data/media/audio
- ${MEDIA_LOCATION:-./data/media/}images:/data/media/images
build:
context: ./nginx
target: ${IMAGE:-local-image}
ports:
- "${NGINX_PORT:-80}:80"
- 443:443
networks:
api-network:
driver: bridge
redis-network:
driver: bridge
volumes:
certbot-etc:
certbot-var:
htpasswd:
driver: local
driver_opts:
type: none
device: "${PWD}/htpasswd/"
o: bind
web-root:
driver: local
driver_opts:
type: none
device: "${PWD}/public/"
o: bind
dhparam:
driver: local
driver_opts:
type: none
device: "${PWD}/dhparam/"
o: bind
version: "3.7"