-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
43 lines (41 loc) · 1.02 KB
/
docker-compose.yaml
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
version: '3.8'
services:
back:
image: 'docker-spring-boot-postgres:latest'
container_name: back
volumes:
- ./back:/app/back
working_dir: '/app/back'
depends_on:
- db
environment:
- POSTGRES_USER=$DB_USERNAME
- POSTGRES_PASSWORD=$DB_PASSWORD
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/$DB_NAME
- SPRING_DATASOURCE_USERNAME=$DB_USERNAME
- SPRING_DATASOURCE_PASSWORD=$DB_PASSWORD
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
ports:
- "8080:8086"
front:
image: 'node:lts-alpine'
container_name: front
volumes:
- ./front:/app/front
working_dir: '/app/front'
entrypoint: ['npm', 'run', 'serve']
ports:
- "3000:8080"
db:
image: postgres
container_name: db
environment:
- POSTGRES_USER=$DB_USERNAME
- POSTGRES_PASSWORD=$DB_PASSWORD
- POSTGRES_DB=$DB_NAME
volumes:
- db-volume:/var/lib/mysql
ports:
- "3306:3306"
volumes:
db-volume: