-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
153 lines (145 loc) · 3.67 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
version: '3.3'
services:
redis:
image: ${REDIS_IMAGE_NAME}
command: redis-server
ports:
- "${REDIS_PORT}:6379"
volumes:
- 'redis${REDIS_VERSION}:/var/lib/redis/data'
networks:
- backend
elasticsearch:
image: ${ELASTICSEARCH_IMAGE_NAME}
ports:
- 9200:9200
- 9300:9300
volumes:
- esdata:/usr/share/elasticsearch/data
networks:
- backend
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=false
- xpack.watcher.enabled=false
restart: always
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mysql:
build:
context: ./mysql
args:
- MYSQL_IMAGE_NAME=${MYSQL_IMAGE_NAME}
command: mysqld --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- TZ=${MYSQL_TIMEZONE}
volumes:
- ${DATA_PATH}/mysql/${MYSQL_SUBPATH}:/var/lib/mysql
ports:
- "${MYSQL_PORT}:3306"
networks:
- backend
postgres:
image: ${POSTGRES_IMAGE_NAME}
volumes:
- ${DATA_PATH}/postgres:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT}:5432"
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_TRUST_METHOD}
networks:
- backend
kubernetes:
build:
context: ./kubernetes
dockerfile: Dockerfile
tty: true
stdin_open: true
volumes:
- aws_config:/root/.aws
- ssh_config:/root/.ssh
- kube_config:/root/.kube
ruby:
image: ${RUBY_IMAGE_NAME}
build:
context: ./ruby
dockerfile: "${MY_RUBY_VERSION}-Dockerfile"
args:
- RAILS_VERSION=${RUBY_RAILS_VERSION}
- INSTALL_BUNDLER=${RUBY_INSTALL_BUNDLER}
- INSTALL_NODE=${RUBY_INSTALL_NODE}
- INSTALL_YARN=${RUBY_INSTALL_YARN}
- INSTALL_POSTGRES=${RUBY_INSTALL_POSTGRES}
- INSTALL_MYSQL=${RUBY_INSTALL_MYSQL}
- INSTALL_QT_DEPS=${RUBY_INSTALL_QT_DEPS}
- INSTALL_XVFB=${RUBY_INSTALL_XVFB}
- INSTALL_DOCKERIZE=${RUBY_INSTALL_DOCKERIZE}
command: rails-up
environment:
- APP_NAME=${APP}
- DB_HOST=${RUBY_DB_HOST}
- DATABASE_HOST=${RUBY_DB_HOST}
- DB_PORT=${RUBY_DB_PORT}
- DB_USER=${RUBY_DB_USER}
- DATABASE_USER=${RUBY_DB_USER}
- DB_PASSWORD=${RUBY_DB_PASSWORD}
- DATABASE_PASSWORD=${RUBY_DB_PASSWORD}
- DB_ADAPTER=${RUBY_DB_ADAPTER}
- DATABASE_ADAPTER=${RUBY_DB_ADAPTER}
- REDIS_PROVIDER=redis://redis:6379
- REDIS_URL=redis://redis:6379
ports:
- "${RUBY_RAILS_PORT}:3000"
- "${RUBY_WEBPACK_DEV_SERVER_PORT}:3035"
tty: true
stdin_open: true
volumes:
- ./ruby/bin/rails-new:/usr/local/bin/rails-new
- ./ruby/bin/rails-up:/usr/local/bin/rails-up
- ./ruby/template/database.yml:/template/database.yml
networks:
- frontend
- backend
logging:
driver: "json-file"
options:
max-size: "5k"
max-file: "5"
networks:
frontend:
driver: "bridge"
backend:
driver: "bridge"
volumes:
mysql:
driver: "local"
postgres:
driver: "local"
redis:
driver: "local"
redis3:
driver: "local"
redis4:
driver: "local"
esdata:
driver: "local"
aws_config:
driver: "local"
ssh_config:
driver: "local"
kube_config:
driver: "local"