forked from PushOCCRP/Push-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-no-nginx-dev.yml
executable file
·149 lines (140 loc) · 3.75 KB
/
docker-compose-no-nginx-dev.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
version: '3.8'
services:
# This configuration excludes NGINX for development purposes so you don't accidently run a full
# web server on your own machine and accidently screw up your ports or what have you.
#
# If you're running in production and don't need NGINX (for instance, if you're on a multi-Docker setup)
# then use `docker-compose-no-ngix.yml`. Otherwise, you probably want `docker-compose-with-nginx.yml`
db:
image: postgres:12-alpine
volumes:
- "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"
ports:
- "3000:3000"
depends_on:
- db
- uniqush
- redis
# - sidekiq
# - scheduled_jobs
env_file:
- ./secrets.env
environment:
- RAILS_ENV=development
- proxy_images=true
- FORCE_SSL=false
- REDIS_URL=redis://redis:6379/0
entrypoint: /push/entrypoint.sh
tty: true
stdin_open: true
networks:
- default
# Since this is the dev setup this starts the webpack-dev-server. It shouldn't be in any of the
# production configurations.
webpack:
build: .
command: bin/webpack-dev-server
volumes:
- ".:/push:cached"
ports:
- "3035:3035"
expose:
- "3035"
env_file:
- ./secrets.env
environment:
- RAILS_ENV=development # This should always be development for this config, even if web is set to production.
- proxy_images=true
- WEBPACKER_DEV_SERVER_HOST=0.0.0.0
tty: true
stdin_open: true
entrypoint: /push/entrypoint_webpacker.sh
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
# - FORCE_SSL=false
# - REDIS_URL=redis://redis:6379
# depends_on:
# - db
# - redis
# - sidekiq
# entrypoint: /push/entrypoint_scheduled_jobs.sh
# tty: true
# stdin_open: true
# networks:
# - default
# Uniqush is used for managing push notifications ourselves
uniqush:
build: https://github.com/PushOCCRP/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"
ports:
- "9898:9898"
depends_on:
- redis
volumes:
- "./secrets:/secrets"
- "./log/uniqush/:/srv/logs/gurac/"
# The Redis server. This is used for both Sidekiq and Uniqush
redis:
image: redis
expose:
- "6379"
volumes:
- "./.docker/redis:/data"
command: ["redis-server", "--appendonly", "yes"]
# 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:
postgres: