-
Notifications
You must be signed in to change notification settings - Fork 74
/
docker-compose.yml
107 lines (98 loc) · 2.38 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: '3.8'
x-system_environment:
&system_environment
links:
- apisonator
- mailhog
- memcached
- mysql
- redis
environment:
- DB_HOST=mysql
- REDIS_URL=redis://redis/1
- MEMCACHE_SERVERS=memcached:11211
- BACKEND_URL=http://apisonator:3001
- BACKEND_REDIS_URL=redis://redis/3
- SECRET_KEY_BASE=secret
- CONFIG_INTERNAL_API_USER=system_app
- CONFIG_INTERNAL_API_PASSWORD=password
- SMTP_ADDRESS=mailhog
- SMTP_PORT=1025
- UNICORN_WORKERS=2
- FORCE_SSL=false
- DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
services:
system:
<<: *system_environment
build:
context: .
args:
CUSTOM_DB: ${DB}
command: bash -c "rm -f tmp/pids/server.pid && UNICORN_WORKERS=2 bin/rails server -b 0.0.0.0"
container_name: system-compose
depends_on:
- apisonator
- mailhog
- memcached
- redis
- mysql
ports:
- "3000:3000"
volumes:
- system-assets:/opt/system/public/assets
- system-node-modules:/opt/system/node_modules
sidekiq:
<<: *system_environment
image: porta_system
command: bash -c "rake sidekiq"
container_name: sidekiq-compose
depends_on:
- system
mysql:
image: mysql:8.0
container_name: mysql-compose
ports:
- "3306:3306"
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
healthcheck:
test: "mysql --user=root --execute 'SHOW DATABASES;'"
timeout: 20s
retries: 10
volumes:
- mysql-data:/var/lib/mysql
memcached:
image: memcached
container_name: memcached-compose
ports:
- "11211:11211"
apisonator:
image: quay.io/3scale/apisonator:latest
container_name: apisonator-compose
ports:
- "3001:3001"
command: "3scale_backend start -p 3001"
depends_on:
- redis
environment:
- CONFIG_REDIS_PROXY=redis:6379/3
- CONFIG_QUEUES_MASTER_NAME=redis:6379/3
- CONFIG_WORKERS_LOG_FILE=/dev/stdout
- CONFIG_INTERNAL_API_USER=system_app
- CONFIG_INTERNAL_API_PASSWORD=password
- RACK_ENV=production
redis:
image: redis:6.2-alpine
container_name: redis-compose
ports:
- "6379:6379"
mailhog:
image: mailhog/mailhog
container_name: mailhog-compose
ports:
- "1025:1025"
- "8025:8025"
volumes:
mysql-data:
system-assets:
system-node-modules: