-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
66 lines (62 loc) · 1.73 KB
/
docker-compose.prod.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
version: '3'
services:
db:
restart: always
image: postgres:11-alpine
volumes:
- ${POSTGRES_VOLUME}:/var/lib/postgresql/data
- ./data/postgresql/backups:/var/lib/postgresql/data/backups
broker:
restart: always
image: rabbitmq:management-alpine
hostname: ${RABBITMQ_HOSTNAME}
ports:
- 5672:5672
- 15672:15672
volumes:
- ./data/rabbitmq:/var/lib/rabbitmq/mnesia/[email protected]:cached
environment:
RABBITMQ_ERLANG_COOKIE: ${RABBITMQ_ERLANG_COOKIE}
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
RABBITMQ_DEFAULT_VHOST: /
VIRTUAL_PORT: 15672
VIRTUAL_HOST: ${RABBITMQ_DOMAINS}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
LETSENCRYPT_HOST: ${RABBITMQ_DOMAINS}
depends_on:
- db
worker:
restart: always
image: kaygeee/inquiries-maker:latest
command: ["rake", "workers:run"]
environment:
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
RABBITMQ_AMQP_URI: ${RABBITMQ_AMQP_URI}
depends_on:
- broker
- db
web:
restart: always
image: kaygeee/inquiries-maker:latest
#command: ["puma", "-e", "production"]
command: ["bundle", "exec", "rackup -s puma -p 8000 --host 0.0.0.0"]
ports:
# HOST:CONTAINER
- 8000:8000
environment:
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
RABBITMQ_AMQP_URI: ${RABBITMQ_AMQP_URI}
VIRTUAL_HOST: ${DOMAINS}
LETSENCRYPT_HOST: ${DOMAINS}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
SSL_CERTIFICATE: ${SSL_CERTIFICATE}
SSL_KEY: ${SSL_KEY}
depends_on:
- db
- broker
- worker
networks:
default:
external:
name: ${NETWORK}