-
Notifications
You must be signed in to change notification settings - Fork 22
/
docker-compose.test.yml
64 lines (60 loc) · 1.64 KB
/
docker-compose.test.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
version: "3.5"
services:
db:
image: postgres:9.5
networks: [askdarcel]
ports: ["5432:5432"]
environment:
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test:
[
"CMD-SHELL",
"psql -U postgres -d askdarcel_development -c 'SELECT 1;' || exit 1",
]
interval: 10s
timeout: 5s
retries: 5
api:
image: sheltertechsf/askdarcel-api:latest
networks: [askdarcel]
ports: ["3000:3000"]
depends_on: [db]
command: bash -c 'bundle install --with=development && bundle exec rake db:setup db:populate && bundle exec rails server --binding=0.0.0.0 -p 3000'
environment:
RAILS_ENV: development
DISABLE_DATABASE_ENVIRONMENT_CHECK: 1
DATABASE_URL: postgres://postgres@db/askdarcel_development
TEST_DATABASE_URL: postgres://postgres@db/askdarcel_test
SECRET_KEY_BASE: abc123
# ALGOLIA_APPLICATION_ID:
# ALGOLIA_API_KEY:
# ALGOLIA_INDEX_PREFIX:
api-go:
image: sheltertechsf/sheltertech-go:latest
networks: [askdarcel]
ports: ["3001:3001"]
depends_on:
db:
condition: service_healthy
environment:
DB_HOST: db
DB_PORT: 5432
DB_NAME: askdarcel_development
DB_USER: postgres
frontend:
image: nginx:stable
networks: [askdarcel]
ports: ["8080:8080"]
depends_on: [api, api-go]
environment:
NGINX_API_URL: http://api:3000
NGINX_API_GO_URL: http://api-go:3001
NGINX_PORT: 8080
NGINX_SERVER_NAME: frontend
volumes:
- ./build:/app/askdarcel
- ./docker/templates:/etc/nginx/templates
networks:
askdarcel:
name: askdarcel