-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
56 lines (51 loc) · 1.2 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
56
version: '3.8'
services:
db:
image: postgres:12-alpine
environment:
POSTGRES_DB: sideprojectdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: sideprojectpassword
ports:
- "5433:5432" # 5433 to avoid conflicts with host postgres server
volumes:
- ./database:/docker-entrypoint-initdb.d
- postgres-data:/var/lib/postgresql/data #DB data persisting
networks:
- network
java-springboot:
build: ./java
depends_on:
- db
ports:
- "8080:8080"
- "35729:35729" # LiveReload server
volumes:
- ./java:/app
environment:
- SPRING_BOOT_DEVTOOLS_RESTART_ENABLED=true
- DB_HOST=db # Can run Java server in IntelliJ instead of Docker
- DB_PORT=5432 # Can run Java server in IntelliJ instead of Docker
networks:
- network
vue-web:
build:
context: ./vue
dockerfile: Dockerfile
volumes:
- ./vue:/srv/app
- vue-node_modules:/srv/app/node_modules
ports:
- "5173:5173"
environment:
- NODE_ENV=development
init: true
stop_grace_period: 1s
networks:
- network
volumes:
postgres-data:
vue-node_modules:
networks:
network:
driver: bridge