-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (58 loc) · 1.84 KB
/
docker-compose.yml
File metadata and controls
65 lines (58 loc) · 1.84 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
# Docker Compose file Reference (https://docs.docker.com/compose/compose-file/)
version: '3.8'
# Define services
services:
# Database Service (Mysql)
db:
image: mysql:8.0.32
ports:
- "3307:3306"
environment:
MYSQL_DATABASE: 'teacher_platform_db'
MYSQL_USER: 'test'
MYSQL_PASSWORD: 'test'
MYSQL_ROOT_PASSWORD: 'password'
volumes:
- db-data:/var/lib/mysql
networks:
- backend
# App backend service
app-server:
# Configuration for building the docker image for the backend service
build:
context: BA_Backend # Use an image built from the specified dockerfile in the `polling-app-server` directory.
dockerfile: Dockerfile
ports:
- "8080:8080" # Forward the exposed port 8080 on the container to port 8080 on the host machine
depends_on:
- db # This service depends on mysql. Start that first.
environment: # Pass environment variables to the service
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/teacher_platform_db?allowPublicKeyRetrieval=true&useSSL=false
networks: # Networks to join (Services on the same network can communicate with each other using their name)
- backend
#- frontend
# Frontend Service
app-client:
build:
context: BA_Frontend # Use an image built from the specified dockerfile in the `polling-app-client` directory.
dockerfile: Dockerfile
#args:
#REACT_APP_API_BASE_URL: http://127.0.0.1:8080/api
#stdin_open: true
#tty: true
ports:
- "3000:3000" # Map the exposed port 3000 on the container to port 3000 on the host machine
depends_on:
- app-server
volumes:
- myFiles:/uploads
#networks:
#- frontend
# Volumes
volumes:
db-data:
myFiles:
# Networks to be created to facilitate communication between containers
networks:
backend:
#frontend: