forked from PushOCCRP/Push-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-no-nginx.yml
executable file
·119 lines (112 loc) · 2.69 KB
/
docker-compose-no-nginx.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
version: '2'
services:
# nginx, working as a front-end proxy for uniqush
# we need it for only allowing certain endpoints to be available
db:
image: postgres:9.6
volumes:
- "./.docker/postgres:/data/postgres"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- PGDATA=/data/postgres
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- ".:/push:cached"
- "rails_cache:/app/tmp/cache"
- "node_modules:/app/node_modules"
- "packs:/app/public/packs"
expose:
- "3000"
depends_on:
- db
- uniqush
- redis
env_file:
- ./secrets.env
environment:
- RAILS_ENV=${RAILS_ENV}
- proxy_images=true
entrypoint: /push/entrypoint.sh
tty: true
stdin_open: true
networks:
- default
# Run ActiveJobs on a schedule using the Clockwork gem
scheduled_jobs:
build: .
command: bundle exec clockwork ./scheduler.rb
volumes:
- ".:/push:cached"
env_file:
- ./secrets.env
environment:
- RAILS_ENV=production
- proxy_images=true
- REDIS_URL=redis://redis:6379/0
- FORCE_SSL=false
depends_on:
- db
- redis
- sidekiq
entrypoint: /push/entrypoint_scheduled_jobs.sh
tty: true
stdin_open: true
networks:
- default
# uniqush itself
uniqush:
build: https://github.com/beevelop/docker-uniqush.git
environment:
# this is the default, but let's be explicit here
UNIQUSH_DATABASE_HOST: "redis"
# UNIQUSH_LOGFILE: "/srv/logs/gurac/uniqush.log"
UNIQUSH_LOGLEVEL: "verbose"
UNIQUSH_GID: "60001"
UNIQUSH_UID: "60001"
depends_on:
- redis
volumes:
- "./secrets:/secrets"
#- "/srv/logs/gurac/:/srv/logs/gurac/"
# The Redis server. This is used for both Sidekiq and Uniqush
redis:
image: redis:buster
restart: always
volumes:
- "./.docker/redis:/data:cached"
command: ["redis-server", "--appendonly", "yes"]
expose:
- "6379"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Sidekiq is used for the ActiveJob backend
sidekiq:
build: .
command: bundle exec sidekiq -C config/sidekiq.yml
volumes:
- ".:/push:cached"
depends_on:
- db
- redis
env_file:
- ./secrets.env
environment:
- RAILS_ENV=production
- proxy_images=true
- FORCE_SSL=false
- REDIS_URL=redis://redis:6379/0
tty: true
stdin_open: true
entrypoint: /push/entrypoint_sidekiq.sh
networks:
- default
volumes:
rails_cache:
node_modules:
packs: