-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.test.yml
119 lines (111 loc) · 3.12 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: '3'
services:
test_reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.8
# Enables the web UI and tells Traefik to listen to docker
container_name: reverse_proxy_test
command:
- --api.insecure=true
- --api.dashboard=true
- --api.debug=true
- --providers.docker
- --entrypoints.web.address=:80
ports:
# The HTTP port
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
#
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
networks:
- web-test
- db-test
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.service=api@internal"
test_database:
image: 'mcs07/postgres-rdkit'
container_name: database_test
shm_size: '4gb'
ports:
- "5432:5432"
volumes:
- ./tests/db:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "psql -U postgres -d postgres -c 'SELECT molecule_id FROM molecule LIMIT 1;' || exit 1"]
interval: 5s
timeout: 2s
retries: 5
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: postgres
networks:
- db-test
test_backend:
image: 'phosphines-backend:latest'
container_name: backend_test
build:
context: ./backend
dockerfile: backend.dockerfile
volumes:
- "./backend/app:/app"
environment:
POSTGRES_SERVER: database_test
POSTGRES_USER: postgres
POSTGRES_PASSWD: testing-password
POSTGRES_DB: postgres
entrypoint: bash prestart.sh
depends_on:
test_database:
condition: service_healthy
networks:
- web-test
- db-test
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=Host(`localhost`) && PathPrefix(`/api`)"
- "traefik.http.services.backend.loadbalancer.server.port=8080"
test_cdk-depict:
image: 'simolecule/cdkdepict:latest'
container_name: cdk_depict_test
networks:
- web-test
labels:
- "traefik.enable=true"
- "traefik.http.routers.cdk-depict.rule=Host(`localhost`) && PathPrefix(`/depict`)"
test_frontend:
image: 'phosphines-frontend:latest'
container_name: frontend_test
volumes:
- "./frontend/src:/app/src"
build:
context: .
dockerfile: frontend.development.dockerfile
networks:
- web-test
entrypoint: npm start
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`localhost`)"
- "traefik.http.services.frontend.loadbalancer.server.port=3000"
test_documentation:
image: "phosphines-docs:latest"
container_name: documentation_test
build:
context: ./docs
dockerfile: docs.dockerfile
entrypoint: bash start.sh
volumes:
- "./docs:/docs"
networks:
- web-test
labels:
- "traefik.enable=true"
- "traefik.http.routers.documentation.rule=Host(`localhost`) && PathPrefix(`/docs`)"
- "traefik.http.services.documentation.loadbalancer.server.port=5000"
networks:
web-test:
db-test: