This repository has been archived by the owner on May 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
81 lines (75 loc) · 1.79 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
version: '3.7'
x-build: &build
build:
context: .
cache_from:
- getit
- quay.io/nyulibraries/getit
- quay.io/nyulibraries/getit:$BRANCH_NO_SLASH
image: getit
x-test-env: &test-env
<<: *build
environment:
RAILS_ENV: test
GETIT_DB_DATABASE: getit_test
BRANCH_NO_SLASH:
CI:
COVERALLS_REPO_TOKEN:
TERM: xterm
PAGER: more
GOOGLE_ANALYTICS_TRACKING_CODE: '12345'
env_file:
- test.env
x-dev-env: &dev-env
<<: *build
env_file:
- test.env
services:
dev:
<<: *dev-env
tty: true
stdin_open: true
ports:
- "3000:3000"
command: ["/tmp/wait-for-it.sh", "db:3306", "--", "bundle", "exec", "rails", "server", "-b", "0.0.0.0"]
depends_on:
- setup_dev
# volumes:
# - .:/app
setup_dev:
<<: *dev-env
command: ["/tmp/wait-for-it.sh", "db:3306", "--", "bundle", "exec", "rake", "db:setup"]
depends_on:
- db
test:
<<: *test-env
tty: true
stdin_open: true
command: ["/tmp/wait-for-it.sh", "db:3306", "--", "bundle", "exec", "rake"]
depends_on:
- setup_test
# volumes:
# - .:/app
setup_test:
<<: *test-env
command: ["/tmp/wait-for-it.sh", "db:3306", "--", "bundle", "exec", "rake", "db:setup"]
depends_on:
- db
db:
image: library/mysql:5.6
expose:
- "3306"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
deploy:
<<: *test-env
tty: true
stdin_open: true
command: "mkdir -p ~/.ssh && touch ~/.ssh/known_hosts && ssh-keyscan github.com >> ~/.ssh/known_hosts && \
bundle exec cap $DEPLOY_ENV deploy:setup && bundle exec cap $DEPLOY_ENV deploy"
user: root
environment:
SSH_AUTH_SOCK: '/ssh-agent'
GIT_COMMIT: "$GIT_COMMIT"
volumes:
- "${HOST_SSH_AUTH_SOCK}:/ssh-agent"