Added docker compose file

This commit is contained in:
Arnaud Nelissen
2025-10-08 12:53:21 +02:00
parent 539b6f262e
commit a4b4ffe9ff
3 changed files with 63 additions and 25 deletions

28
docker-compose.yaml Normal file
View File

@@ -0,0 +1,28 @@
version: '3' # docker-compose version
services: # services which our app going to use. (list of containers we want to create)
mongodb: # container name
image: mongo # which image container will build on
ports:
- "27017:27017"
networks: # adding network
- lsp-network
volumes:
- mongo-data:/data/db
lsp:
build: . # build the Docker image for the service using the Dockerfile located in the current directory
ports:
- "4443:443"
- "8080:80"
networks: # adding network
- lsp-network
depends_on:
- mongodb
networks: # allow services to talk to each other while providing isolation from other docker container, running on the same host
lsp-network:
driver: bridge
volumes: # enable persistence of database data across container restart
mongo-data:
driver: local