-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (51 loc) · 1.07 KB
/
docker-compose.yml
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
version: "3.8"
services:
# MongoDB Service
mongo:
image: mongo:latest
container_name: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=supersecretpassword
ports:
- "27018:27017"
volumes:
- mongo_data:/data/db
networks:
- app-network
# Backend Service
backend:
build:
context: ./snmp_reader_backend
dockerfile: Dockerfile
container_name: backend
environment:
- MONGODB_URI=mongodb://admin:supersecretpassword@mongo:27017/?authSource=admin
- TZ=Europe/Berlin
ports:
- "161:161/udp"
- "2161:2161/udp"
- "8080:8080/tcp"
depends_on:
- mongo
networks:
- app-network
# Frontend Service
frontend:
build:
context: ./snmp_reader_frontend
dockerfile: Dockerfile
container_name: frontend
ports:
- "3000:3000"
environment:
- VITE_API_BASE=http://localhost:8080/
networks:
- app-network
# Networks
networks:
app-network:
driver: bridge
# Volumes
volumes:
mongo_data: