-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-test.yml
80 lines (78 loc) · 1.76 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
version: '3'
services:
app:
tty: true
container_name: apptest
build:
context: 'app'
dockerfile: 'Dockerfile'
environment:
- PORT=4000
ports:
- 4000:4000
networks:
- openelections
# volumes:
# - ./app/src:/app/src
# - ./app/yarn.lock:/app/yarn.lock
api:
container_name: apitest
tty: true # Enables debugging capabilities when attached to this container.
user: root
build:
context: 'api'
dockerfile: 'Dockerfile.development'
# volumes:
# - ./api:/app
command: ["./wait-for-it.sh", "testdb:5433", "--", "npm", "run", "seedandrun"]
environment:
- PORT=3000
- NODE_ENV=test
- SECRET_KEY=bananas
- DB_USERNAME=postgres
- DB_PASSWORD=password
- DB_NAME=open_elections_test
- DB_HOST=testdb
- SKIP_DB_WAIT=0
- SKIP_DB_MIGRATION=0
- SKIP_NPM_INSTALL=0
- SKIP_BOWER_INSTALL=0
- DB_PORT=5432
- APP_ENV=test
depends_on:
- testdb
- datatest
ports:
- 3000:3000
networks:
- openelections
testdb:
container_name: testdb
image: mdillon/postgis
ports: ['5434:5432']
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=open_elections_test
networks:
- openelections
datatest:
build:
context: ./datascience
command: ["sh", "/app/openelections/api/start.sh"]
depends_on:
- testdb
ports:
- 8080:80
# volumes:
# - ./datascience:/app
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=open_elections_test
- POSTGRES_PORT=5432
- POSTGRES_HOST=testdb
networks:
- openelections
networks:
openelections: