forked from SvenGuthe/DockerComposeSpringAPIAngularMySQL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (49 loc) · 1.12 KB
/
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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: '3.3'
services:
database:
image: mysql
container_name: database
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: dockerAngularSpringDatabase
MYSQL_USER: user
MYSQL_PASSWORD: password
restart: always
ports:
- 3306:3306
volumes:
- dockerAngularSpringDatabaseData:/var/lib/mysql
networks:
- backendNetwork
springapi:
image: openjdk:10-jre-slim
container_name: springapi
ports:
- 8080:8080
depends_on:
- database
restart: always
volumes:
- ./Spring/target/spring-0.0.1-SNAPSHOT.jar:/application.jar
command: ["java", "-jar", "application.jar"]
networks:
- backendNetwork
- frontendNetwork
angular:
image: nginx:alpine
container_name: angular
ports:
- 4200:80
restart: always
depends_on:
- springapi
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./Angular/dist/Angular/:/usr/share/nginx/html
networks:
- frontendNetwork
volumes:
dockerAngularSpringDatabaseData:
networks:
backendNetwork:
frontendNetwork: