-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
docker-compose-testing.yml
81 lines (81 loc) · 2.26 KB
/
docker-compose-testing.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
version: "2"
services:
db:
image: mariadb:10.2
network_mode: "service:web"
environment:
- MYSQL_DATABASE=plots
- MYSQL_USER=plots
- MYSQL_PASSWORD=plots
- MYSQL_RANDOM_ROOT_PASSWORD=true
volumes:
- ../config/my.cnf:/etc/mysql/my.cnf
# for configuration
- ../../mysql:/var/lib/mysql
# for persistence
- ../../dump:/docker-entrypoint-initdb.d
# for importing a dump
# if you want to re-import simply put away ../../mysql/*
redis:
image: redis:latest
command: redis-server
web:
build: ..
cap_add:
- SYS_PTRACE
environment:
- COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME}
- DB_USER=${DB_USER}
- DB_NAME=${DB_NAME}
- DB_PASS=${DB_PASS}
- DB_HOST=${DB_HOST}
- RAILS_MAX_THREADS=${RAILS_MAX_THREADS}
- RAILS_ENV=${RAILS_ENV}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- REDIS_URL=redis://redis:6379/0
- DANGER_GITHUB_API_TOKEN=${DANGER_GITHUB_API_TOKEN}
- TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST}
- TRAVIS_REPO_SLUG=${TRAVIS_REPO_SLUG}
- CI=${CI}
- TRAVIS=${TRAVIS}
- CONTINUOUS_INTEGRATION=${CONTINUOUS_INTEGRATION}
# used to tell if we are in a Travis environment:
- HAS_JOSH_K_SEAL_OF_APPROVAL=${HAS_JOSH_K_SEAL_OF_APPROVAL}
- GITHUB_ACTION=${GITHUB_ACTION}
- GITHUB_TOKEN=${GITHUB_TOKEN}
- GITHUB_REPOSITORY=${GITHUB_REPOSITORY}
- GITHUB_EVENT_PATH=${GITHUB_EVENT_PATH}
- GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME}
- QT_QPA_PLATFORM=${QT_QPA_PLATFORM}
- TASK=${TASK}
links:
- redis
volumes:
- ..:/app
restart: unless-stopped
sidekiq:
build: ..
command: bundle exec sidekiq
depends_on:
- db
- redis
links:
- db
- redis
volumes:
- .:/app
environment:
- RAILS_ENV=${RAILS_ENV}
- REDIS_URL=redis://redis:6379/0
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- DB_USER=${DB_USER}
- DB_NAME=${DB_NAME}
- DB_PASS=${DB_PASS}
- DB_HOST=${DB_HOST}
- DB_SOCKET=${DB_SOCKET}
- SMTP_USER=${SMTP_USER}
- SMTP_PASS=${SMTP_PASS}
- SMTP_HOST=${SMTP_HOST}
- SMTP_PORT=${SMTP_PORT}
- SMTP_AUTH=${SMTP_AUTH}
- SMTP_STLS=${SMTP_STLS}