HSG-MCS-HS21_tapas/docker-compose-local.yml
Peter Guhl df53236853
Compiling and running tapas on a local docker installation (#10)
* First version building tasks and mongodb

* Creating container for local tests

* Initial version

* Added mongodb to correct network

* Added auction house

* Acknowledgments, Dockerfile for app

* Added app to build

* Dockerfile for app

* Mapped app port to localhost:8080

Co-authored-by: Ubuntu <ubuntu@docker-tests.novalocal>
2021-11-16 16:12:15 +01:00

61 lines
1.5 KiB
YAML

# Dockerfile/Docker-Compose file based on an initial version authored by Alexander Lontke (ASSE, Fall Semester 2021)
version: "3.7"
services:
app:
build:
context: ./app
dockerfile: Dockerfile
# Use environment variables instead of application.properties
environment:
- KEY=VALUE
ports: #Just needed when testing from outside the docker network
- "8080:8080"
networks:
- tapas-network
tapas-tasks:
build:
context: ./tapas-tasks
dockerfile: Dockerfile
# Use environment variables instead of application.properties
environment:
- KEY=VALUE
ports: #Just needed when testing from outside
- "8081:8081"
networks:
- tapas-network
tapas-auction-house:
build:
context: ./tapas-auction-house
dockerfile: Dockerfile
# Use environment variables instead of application.properties
environment:
- KEY=VALUE
ports: #Just needed when testing from outside
- "8082:8082"
networks:
- tapas-network
mongodb:
image: mongo
container_name: mongodb
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 8nP7s0a # Can not be changed again later on
volumes:
- database:/data/db
networks:
- tapas-network
#Volume for mongodb. One per server.
volumes:
database:
networks:
tapas-network:
driver: bridge