-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
134 lines (125 loc) · 3.1 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
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
version: '3.7'
volumes:
development-database-data-volume:
test-database-data-volume:
elastic_search:
rails_cache:
bundle:
node_modules:
packs:
services:
instachat: &instachat
container_name: instachat
hostname: instachat
image: instachat
build:
context: .
dockerfile: Dockerfile
args:
APP_USER_ID: ${APP_USER_ID}
ports:
- 3000:3000
restart: always
tty: true
stdin_open: true
# depends_on:
# - instachat_development_database
# - instachat_test_database
volumes:
- .:/home/instachat/instachat:cached
- ~/.ssh:/home/instachat/.ssh
- rails_cache:/home/instachat/instachat/tmp/cache
- bundle:/bundle
- node_modules:/home/instachat/instachat/node_modules
- packs:/home/instachat/instachat/public/packs
tmpfs:
- /tmp
env_file: .env
command: sh sleeper.sh elastic_search:9200
links:
- elastic_search
- instachat_redis
environment:
- ES_HOST=elastic_search
entrypoint: ["/home/instachat/docker-entrypoint.sh"]
# command: ["bundle", "exec", "rails" , "db:create"]
# command: ["bundle", "exec", "rails" , "db:migrate"]
command: sh cron -f
command: ["bundle", "exec", "rails","server","-b","0.0.0.0","-p","3000"]
go-app:
image: golang:1.16.2
container_name: go_app
tty: true
stdin_open: true
build:
context: ./go_app
dockerfile: Dockerfile
env_file: .env
links:
- elastic_search
- instachat_redis
- instachat
depends_on:
- elastic_search
- instachat_redis
- instachat
elastic_search:
image: elasticsearch:5.4.0-alpine
restart: always
ports:
- "9200:9200"
expose:
- "9200"
volumes:
- ./volumes/es:/usr/share/elasticsearch/data
depends_on:
- instachat_redis
# instachat_worker:
# <<: *instachat
# command: bundle exec rake environment resque:work QUEUE=*
# container_name: instachat_worker
# hostname: instachat_worker
# ports: []
# entrypoint: ""
# depends_on:
# - instachat_development_database
# - instachat_test_database
# - instachat_redis
# - instachat
instachat_development_database: &database
image: mysql:5.7.33
environment:
MYSQL_ROOT_PASSWORD: instachat
MYSQL_DATABASE: instachat_development
MYSQL_USER: instachat
MYSQL_PASSWORD: instachat
container_name: instachat_database_development
restart: always
volumes:
- development-database-data-volume:/var/lib/mysql
ports:
- '3306:3306'
expose:
- '3306'
instachat_test_database:
<<: *database
environment:
MYSQL_ROOT_PASSWORD: instachat
MYSQL_DATABASE: instachat_test
MYSQL_USER: instachat
MYSQL_PASSWORD: instachat
container_name: instachat_database_test
volumes:
- test-database-data-volume:/var/lib/mysql
ports:
- '3307:3307'
expose:
- '3307'
instachat_redis:
container_name: instachat_redis
image: redis
restart: always
ports:
- '6379:6379'
expose:
- '6379'