-
Notifications
You must be signed in to change notification settings - Fork 17
/
compose.yml
79 lines (73 loc) · 1.85 KB
/
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
services:
farm:
build:
context: ./server
dockerfile: ./docker/server/Dockerfile
volumes:
- ./server/app:/app
environment:
REDIS_URL: 'redis://redis:6379/0'
POSTGRES_DSN: 'host=postgres port=5432 user=farm password=farm dbname=farm'
SERVER_PASSWORD: ${SERVER_PASSWORD}
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
celery:
build:
context: ./server
dockerfile: ./docker/celery/Dockerfile
volumes:
- ./server/app:/app
environment:
CELERY_BROKER_URL: 'redis://redis:6379/1'
POSTGRES_DSN: 'host=postgres port=5432 user=farm password=farm dbname=farm'
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
front:
build:
context: ./server
dockerfile: ./docker/front/Dockerfile
restart: unless-stopped
ports:
- "5137:80"
postgres:
image: postgres:14.1-alpine
restart: unless-stopped
environment:
POSTGRES_USER: farm
POSTGRES_PASSWORD: farm
POSTGRES_DB: farm
volumes:
- ./vol/db:/var/lib/postgresql/data
healthcheck:
test: pg_isready -U farm -d farm
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
cacheproxy:
build: httpproxy
restart: unless-stopped
environment:
REDIS_URL: 'redis://redis:6379/2'
ports:
- "8888:8888"
depends_on:
- redis
redis:
image: redis:7.2.0-alpine
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes"]
volumes:
- ./vol/redis:/data
external_redis:
image: redis:7.2.0-alpine
ports:
- "6378:6379"
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes", "--requirepass", "${EXTERNAL_REDIS_PASSWORD:-changeme}"]
volumes:
- ./vol/external_redis:/data