Added mongo container

This commit is contained in:
Notoric 2024-08-05 18:32:46 +01:00
parent 3ab0e1fa43
commit b75dce5352
2 changed files with 14 additions and 1 deletions

5
.gitignore vendored
View File

@ -9,4 +9,7 @@ backend/node_modules/
backend/.env backend/.env
# Frontend-specific # Frontend-specific
frontend/node_modules/ frontend/node_modules/
# Database-specific
database/data/

View File

@ -1,5 +1,6 @@
services: services:
backend: backend:
container_name: backend
build: build:
context: ./backend context: ./backend
dockerfile: Dockerfile dockerfile: Dockerfile
@ -10,6 +11,7 @@ services:
- ./backend:/app - ./backend:/app
frontend: frontend:
container_name: frontend
build: build:
context: ./frontend context: ./frontend
dockerfile: Dockerfile dockerfile: Dockerfile
@ -18,4 +20,12 @@ services:
volumes: volumes:
- ./frontend:/app - ./frontend:/app
- ./frontend:/node_modules - ./frontend:/node_modules
db:
container_name: database
image: mongodb/mongodb-community-server
ports:
- "27017:27017"
volumes:
- ./database/data:/data/db