-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (28 loc) · 927 Bytes
/
docker-compose.yml
File metadata and controls
34 lines (28 loc) · 927 Bytes
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
version: '3.8'
services:
backend:
image: ngngka/dictionary-webapp-docker:backend-latest
build:
context: ./
dockerfile: ./base/Dockerfile
command: python manage.py runserver 0.0.0.0:8000 # 0.0.0.0:8000
container_name: backend_c
ports: # this basically maps local machine port 8000 to the container local port 8000
- 8000:8000
# Note: ports has 2 functions:
# 1. allow access on local machine (local machine port 8000 will point to container port 8000)
# 2. other container can access this service with the specified port (8000)
environment:
- RAPID_API_KEY=${RAPID_API_KEY}
frontend:
image: ngngka/dictionary-webapp-docker:frontend-latest
build:
context: ./dictionary_frontend
dockerfile: Dockerfile
container_name: frontend_c
ports:
- 4173:4173
stdin_open: true
tty: true
depends_on:
- backend