dockerized the project for dev

This commit is contained in:
QkoSad
2024-09-06 16:27:48 +03:00
parent 8e83b6b8df
commit 04ae8b7be8
47 changed files with 363 additions and 635 deletions
+39
View File
@@ -0,0 +1,39 @@
services:
app:
image: devcon-frontend-dev
build:
context: ./client
dockerfile: ./dev.Dockerfile
ports:
- 3000:3000
volumes:
- ./client:/usr/src/app
server:
image: devcon-backend-dev
build:
context: ./server
dockerfile: ./dev.Dockerfile
ports:
- 5000:5000
volumes:
- ./server:/usr/src/app
environment:
MONGO_URL: "mongodb://the_username:the_password@mongo:27017/the_database"
mongo:
image: mongo
ports:
- 3456:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
MONGO_INITDB_DATABASE: the_database
volumes:
- ./mongo/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js
- mongo_data:/data/db
volumes:
mongo_data: