-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
37 lines (36 loc) · 1.11 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
version: '2'
services:
app:
image: 'ch3nguyen/bootforum:latest'
container_name: bootforum
depends_on:
db:
condition: service_healthy
links:
- db
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/BootForum
- SPRING_DATASOURCE_USERNAME=BootForum
- SPRING_DATASOURCE_PASSWORD=secret
- File.uploadDirectory=/var/BootForum/files
- Lucene.indexDirectory=/var/BootForum/index
ports:
- 8080:8080
volumes:
# map the host's current-directory/BootForum to app's BootForum/files & BootForum/index
- ./BootForum/files:/var/BootForum/files
- ./BootForum/index:/var/BootForum/index
db:
container_name: postgres
image: 'postgres:13.1-alpine'
volumes:
# map the host's current-directory/postresql/data to postgresql's data
- ./postgresql/data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=BootForum
- POSTGRES_PASSWORD=secret
healthcheck:
test: ["CMD-SHELL", "pg_isready -U BootForum"]
interval: 5s
timeout: 5s
retries: 5