-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
65 lines (62 loc) · 1.96 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
version: "3.9"
services:
postgres:
image: postgres:alpine
container_name: postgres
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "${POSTGRES_DB}"
volumes:
- postgres-data:/var/lib/postgresql/data
- db-socket:/var/run/postgresql
restart: unless-stopped
redis:
image: redis:alpine
container_name: redis
environment:
REDIS_CONFIG: |
unixsocket /var/run/redis/redis.sock
unixsocketperm 777
command:
sh -c "echo \"$$REDIS_CONFIG\" > /etc/redis.conf && redis-server /etc/redis.conf"
volumes:
- redis-data:/data
- redis-socket:/var/run/redis
restart: unless-stopped
tunnelquestbot:
build:
context: .
dockerfile: Dockerfile
container_name: tunnelquestbot
depends_on:
- postgres
- redis
environment:
SERVERS_BLUE_LOG_FILE_PATH: "/logfiles/${SERVERS_BLUE_LOG_FILE}"
SERVERS_GREEN_LOG_FILE_PATH: "/logfiles/${SERVERS_GREEN_LOG_FILE}"
SERVERS_RED_LOG_FILE_PATH: "/logfiles/${SERVERS_RED_LOG_FILE}"
REDIS_SOCKET_DIR: "${REDIS_SOCKET_DIR}"
FAKE_LOGS: "${FAKE_LOGS:-false}"
DEBUG_MODE: "${DEBUG_MODE:-false}"
volumes:
- type: bind
source: "${LOG_SOURCE_PATH}"
target: /logfiles
- type: bind
source: ".env"
target: /app/.env
- "db-socket:${DB_SOCKET_DIR}"
- "redis-socket:${REDIS_SOCKET_DIR}"
restart: always
ports:
# Node.js Debug port is 9229
# It would be better to open this conditionally, but doing that in
# docker-compose isn't straightforward. This likely won't hurt to open even
# for our production server because ... it's a NUC in someone's basement.
- "9229:9229"
volumes:
postgres-data:
db-socket:
redis-socket:
redis-data: