-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (32 loc) · 1.47 KB
/
docker-compose.yml
File metadata and controls
36 lines (32 loc) · 1.47 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
version: '3.7' # Specify the version of the Compose file format
services:
# Define the backend service
backend:
build:
context: ./API/simple-api-student-main # Directory containing the Dockerfile for the backend service
dockerfile: Dockerfile # Name of the Dockerfile to use for building the image
networks:
- app-network # Attach this service to the app-network
depends_on:
- database # Ensure that the database service is started before this service
# Define the database service
database:
build:
dockerfile: Dockerfile # Name of the Dockerfile to use for building the image (context is implicitly the current directory)
networks:
- app-network # Attach this service to the app-network
# Define the HTTP server service
httpd:
build:
context: ./http # Directory containing the Dockerfile for the HTTP server service
dockerfile: Dockerfile # Name of the Dockerfile to use for building the image
ports:
- "8085:80" # Map port 8085 on the host to port 80 on the container
networks:
- app-network # Attach this service to the app-network
depends_on:
- backend # Ensure that the backend service is started before this service
- database # Ensure that the database service is started before this service
# Define the network
networks:
app-network: # Name of the network