-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-start-front-and-back.yml
More file actions
82 lines (78 loc) · 2.13 KB
/
docker-compose-start-front-and-back.yml
File metadata and controls
82 lines (78 loc) · 2.13 KB
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
version: '3.8'
# This compose file builds and starts the backend with mysql
# and frontend services for development and testing purposes.
# After starting the services you can run the tests with the command:
# docker-compose exec frontend npm run robottests
services:
# Backend Service
efilibrary-backend:
container_name: efilibrary-backend
image: ghcr.io/libraryprojectgroup/library-project-backend:latest
environment:
DATABASE_SERVER: ${DATABASE_SERVER}
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USER: ${DATABASE_USER}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
OIDC_AUTH_BACKLINK_URL: ${OIDC_AUTH_BACKLINK_URL}
OIDC_AUTH_REDIRECT_URL: ${OIDC_AUTH_REDIRECT_URL}
PORT: 3002
volumes:
- sql:/app/sql/.
networks:
- testing-network
ports:
- '3002:3002'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3002/health']
interval: 15s
timeout: 10s
retries: 15
# MySQL Database
efilibrary-mysql:
image: mysql
volumes:
- sql:/docker-entrypoint-initdb.d
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
networks:
- testing-network
ports:
- 3306:3306
expose:
- 3306
# Frontend tests Service
frontend:
shm_size: 2gb # Needed for chrome not to crash
container_name: frontend
image: frontend
command: npm run start
build:
context: ./
dockerfile: Dockerfile
environment:
REACT_APP_BACKEND_URL: ${REACT_APP_BACKEND_URL}
GENERATE_SOURCEMAP: 'false'
TESTUSERNAME: ${TESTUSERNAME}
TESTPASSWORD: ${TESTPASSWORD}
TESTUSERNAME2: ${TESTUSERNAME2}
TESTPASSWORD2: ${TESTPASSWORD2}
volumes:
- ./src:/app/src
- ./robot:/app/robot
- ./public:/app/public:ro
ports:
- '3000:3000'
networks:
- testing-network
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/']
interval: 15s
timeout: 10s
retries: 15
networks:
testing-network:
volumes:
sql: