-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
155 lines (145 loc) · 3.29 KB
/
docker-compose.yaml
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
150
151
152
153
154
155
version: '3'
secrets:
pgpassword:
external: true
signing_secret:
external: true
services:
base:
&base
image: chatwoot/chatwoot:latest
container_name: chatwoot
hostname: chatwoot
env_file: ./quepasa-chatwoot/.env
volumes:
- /data/storage:/app/storage
restart: always
stdin_open: true
tty: true
depends_on:
- postgres
- redis
networks:
- quepasa-network
quepasa:
image: quepasa
container_name: "quepasa"
mem_limit: 4096M
env_file:
- ./quepasa-source/helpers/.env
extra_hosts:
- "host.docker.internal:host-gateway"
build:
context: ./
dockerfile: ./quepasa-source/docker/Dockerfile
volumes:
- ./quepasa-source/src:/opt/quepasa
# command: /bin/bash docker-entrypoint.sh
restart: always
stdin_open: true
tty: true
networks:
- quepasa-network
rails:
<<: *base
container_name: chatwoot-rails
hostname: chatwoot-rails
depends_on:
- postgres
- redis
environment:
- NODE_ENV=production
- RAILS_ENV=production
- INSTALLATION_ENV=docker
restart: always
networks:
- quepasa-network
entrypoint: docker/entrypoints/rails.sh
command: >
sh -c "while ! nc -z postgres 5432; do sleep 1; done;
bundle exec rails db:chatwoot_prepare;
bundle exec rails s -p 3000 -b '0.0.0.0';
bundle install"
sidekiq:
<<: *base
container_name: chatwoot-sidekiq
hostname: chatwoot-sidekiq
depends_on:
- postgres
- redis
environment:
- NODE_ENV=production
- RAILS_ENV=production
- INSTALLATION_ENV=docker
networks:
- quepasa-network
restart: unless-stopped
command:
[
'bundle',
'exec',
'sidekiq',
'-C',
'config/sidekiq.yml'
]
postgres:
image: postgres:12
container_name: chatwoot-postgres
hostname: chatwoot-postgres
restart: always
volumes:
- ./quepasa-chatwoot/data/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_DB=chatwoot
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=chatwoot
networks:
- quepasa-network
pgadmin:
image: dpage/pgadmin4:latest
container_name: chatwoot-pgadmin4
hostname: chatwoot-pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: "[email protected]"
PGADMIN_DEFAULT_PASSWORD: "PgAdmin2021!"
restart: always
depends_on:
- postgres
networks:
- quepasa-network
redis:
image: redis:alpine
container_name: chatwoot-redis
hostname: chatwoot-redis
restart: always
command:
[
"sh",
"-c",
"redis-server --requirepass \"$REDIS_PASSWORD\""
]
env_file: ./quepasa-chatwoot/.env
volumes:
- ./quepasa-chatwoot/data/redis:/data
networks:
- quepasa-network
nginx:
build:
context: ./quepasa-nginx
dockerfile: Dockerfile
container_name: nginx
entrypoint: nginx -g "daemon off;"
ports:
- "8080:8080" #chatwoot
- "8081:8081" #quepasa
- "8082:8082" #pgadmin
- "8083:8083" #redis
restart: always
networks:
- quepasa-network
depends_on:
- quepasa
networks:
quepasa-network:
name: quepasa-network
driver: bridge