-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (56 loc) · 1.25 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
57
58
59
60
---
version: "3.3"
services:
frontend:
container_name: spring-task-client
restart: always
environment:
- NODE_ENV=Docker
build:
context: ./client
dockerfile: Dockerfile
volumes:
- ./client/src:/app/src
ports:
- 4000:4000
command: bash -c "yarn build && yarn start"
db:
container_name: spring-task-db
image: postgres:13.3-alpine
restart: always
environment:
- POSTGRES_DB=springdemo
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=root
api:
container_name: spring-task-api
restart: always
build:
context: ./server
dockerfile: Dockerfile
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/springdemo
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=root
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
depends_on:
- db
links:
- db
volumes:
- ./server/src:/api/src
ports:
- 8081:8081
nginx:
container_name: spring-task-proxy
image: nginx:1.20-alpine
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
# - ./nginx/conf.d:/etc/nginx/conf.d
depends_on:
- api
- frontend