-
Notifications
You must be signed in to change notification settings - Fork 86
/
docker-compose.yml
88 lines (81 loc) · 1.99 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
version: '3'
services:
postgresql:
container_name: 'homeland_postgresql'
image: postgres:9.5-alpine
ports:
- '5432'
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./data/postgresql:/var/lib/postgresql/data
redis:
container_name: 'homeland_redis'
image: redis:7-alpine
ports:
- '6379'
volumes:
- ./data/redis:/data
- ./etc/redis.conf:/etc/redis.conf
command: redis-server /etc/redis.conf
app: &app_base
container_name: 'homeland_app'
image: homeland/homeland:${IMAGE_VERSION:-3-8-latest}
env_file:
- app.secret.env
- app.local.env
links:
- postgresql
- redis
logging:
options:
max-size: '1g'
max-file: '10'
volumes:
- ./data/uploads:/home/app/homeland/public/uploads
- ./shared/cache/uploads-thumb:/home/app/cache/uploads-thumb
- ./shared/plugins:/home/app/homeland/plugins
- ./log:/home/app/log
- ./tmp/pids:/home/app/pids
- ./log:/home/app/homeland/log
- ./tmp:/home/app/homeland/tmp
- ./etc/nginx/conf.d:/etc/nginx/conf.d
command: /home/app/homeland/bin/docker-start
ports:
- '7000'
app_backup:
<<: *app_base
container_name: 'homeland_app_backup'
command: bundle exec puma -C config/puma-backup.rb
ports:
- '7001'
worker:
<<: *app_base
container_name: 'homeland_worker'
ports: []
command: bundle exec sidekiq -C config/sidekiq.yml
web:
<<: *app_base
container_name: 'homeland_web'
links:
- app
- app_backup
- worker
command: /etc/nginx/start
ports:
- '8080:80'
caddy:
image: caddy:2-alpine
container_name: 'homeland_caddy'
restart: unless-stopped
env_file:
- app.local.env
ports:
- '80:80'
- '443:443'
volumes:
- ./etc/caddy/Caddyfile:/etc/caddy/Caddyfile
- ./shared/caddy/data:/data
links:
- web
command: caddy run --config /etc/caddy/Caddyfile