forked from gulshanje/springboot-microservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
27 lines (20 loc) · 886 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
version: '3.8'
services:
spring-app:
build:
context: ./country-service-backend # Path to the folder where your backend Dockerfile is located.
dockerfile: Dockerfile
ports:
- "8080:8080" # Standard way to map, same port inside and outside.
environment:
SPRING_PROFILES_ACTIVE: local # Set active Spring profile, this is default usually.
restart: always # Should always restart if it stops, regardless of the exit status.
frontend:
build:
context: ./country-service-front # Path to the folder where your Angular Dockerfile is located.
dockerfile: Dockerfile
ports:
- "8081:80" # Exposing the Angular app on port 8081 and nginx exposing inside port 80.
depends_on:
- spring-app # Front end waits for backend
restart: always # Should always restart if it stops, regardless of the exit status.