-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (40 loc) · 906 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (40 loc) · 906 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
32
33
34
35
36
37
38
39
40
41
42
43
44
version: '3.8'
services:
shortlink.db:
image: mongo:latest
container_name: shortlink.db
restart: always
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: azerty
MONGO_INITDB_DATABASE: shortlink
volumes:
- mongo_data:/data/db
shortlink.backend.app:
build:
context: ./short-link-backend/.
dockerfile: Dockerfile
container_name: shortlink.backend.app
ports:
- "5000:5000"
links:
- shortlink.db
depends_on:
- shortlink.db
restart: always
shortlink.frontend.app:
build:
context: ./short-link-frontend/.
dockerfile: Dockerfile
container_name: shortlink.frontend.app
ports:
- "8081:80"
links:
- shortlink.backend.app
depends_on:
- shortlink.backend.app
restart: always
volumes:
mongo_data: