-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdocker-compose.yml
36 lines (35 loc) · 983 Bytes
/
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
# Run ./bootstrap.sh before running `docker-compose up`
version: '3'
services:
mysql:
image: mysql:5.7
volumes:
- ./tmp/mysql:/var/lib/mysql
restart: always
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "portal"
MYSQL_USER: "portal"
MYSQL_PASSWORD: "portal"
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "sh", "-c", "mysqladmin ping -u $$MYSQL_USER --password=$$MYSQL_PASSWORD"]
timeout: 20s
retries: 10
portal:
build: .
environment:
RAILS_ENV: production
RAILS_CREDENTIALS_PATH: config/credentials.yml.enc.sample
RAILS_MASTER_KEY: db0bda6c389e83e57d30c0f1f5f09a6b
DATABASE_URL: "mysql2://portal:portal@mysql:3306/portal"
KEY_CLAIM_HOST: "localhost:8000"
KEY_CLAIM_TOKEN: thisisatoken
RAILS_SERVE_STATIC_FILES: 1
RAILS_LOG_TO_STDOUT: 1
ports:
- "3000:3000"
depends_on:
- mysql
restart: unless-stopped