-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (56 loc) · 1.44 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
x-app: &default-app
build: .
user: "node"
env_file:
- .env
environment:
- NODE_ENV=production
- REDIS_HOST=${REDIS_HOST}
- REDIS_PASSWORD=${REDIS_PASSWORD}
volumes:
- ${PWD}/${UPLOADS_FOLDER}:/app/${UPLOADS_FOLDER}
stop_grace_period: "3s"
tty: true
depends_on:
- redis
services:
eolo_server:
<<: *default-app
ports:
- "${NODE_PORT}:${NODE_PORT}"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
healthcheck:
test: "${DOCKER_WEB_HEALTHCHECK_TEST:-curl localhost:${NODE_PORT}/healthz}"
interval: "60s"
timeout: "3s"
start_period: "5s"
retries: 3
deploy:
resources:
limits:
cpus: "${DOCKER_SERVER_CPUS:-0}"
memory: "${DOCKER_SERVER_MEMORY:-0}"
eolo_worker:
<<: *default-app
command: "node --experimental-specifier-resolution=node ./dist/worker.js"
redis:
container_name: redis-container
image: "redis:alpine"
command: redis-server --requirepass ${REDIS_PASSWORD}
env_file:
- .env
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
- REDIS_REPLICATION_MODE=master
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
volumes:
# save redisearch data to your current working directory
- ./redis-data:/data
# command:
# # Save if 100 keys are added in every 10 seconds
# - "--save 10 100"
# # Set password
# - "--requirepass ${REDIS_PASSWORD}"
volumes:
redis-data: