29 lines
459 B
YAML
29 lines
459 B
YAML
version: "3.7"
|
|
services:
|
|
spring-web-api:
|
|
container_name: spring-web-api
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- 8080:8080
|
|
depends_on:
|
|
- mongo
|
|
env_file:
|
|
- docker-compose.env
|
|
|
|
mongo:
|
|
image: mongo
|
|
container_name: mongo
|
|
restart: always
|
|
ports:
|
|
- 27017:27017
|
|
env_file:
|
|
- docker-compose.env
|
|
volumes:
|
|
- mongo:/data/db
|
|
|
|
volumes:
|
|
mongo:
|
|
name: spring-web-db
|