Skip to content

Commit 7835b58

Browse files
author
nguye
committed
Update Docker configurations
1 parent 13bfca3 commit 7835b58

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM openjdk:8-jdk-alpine
3+
FROM openjdk:11.0.13-jre-buster
44
ARG JAR_FILE=target/BootForum-*.war
55
COPY ${JAR_FILE} BootForum.war
66
ENTRYPOINT ["java","-jar","/BootForum.war"]

docker-compose.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '2'
33
services:
44
app:
55
image: 'ch3nguyen/bootforum:latest'
6-
container_name: app
6+
container_name: bootforum
77
depends_on:
88
db:
99
condition: service_healthy
@@ -13,14 +13,19 @@ services:
1313
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/BootForum
1414
- SPRING_DATASOURCE_USERNAME=BootForum
1515
- SPRING_DATASOURCE_PASSWORD=secret
16+
- File.uploadDirectory=/var/BootForum/files
17+
- Lucene.indexDirectory=/var/BootForum/index
1618
ports:
1719
- 8080:8080
1820
volumes:
19-
- ./bootforum/files:/tmp/BootForum/files
21+
# map the host's current-directory/BootForum to app's BootForum/files & BootForum/index
22+
- ./BootForum/files:/var/BootForum/files
23+
- ./BootForum/index:/var/BootForum/index
2024
db:
2125
container_name: postgres
2226
image: 'postgres:13.1-alpine'
2327
volumes:
28+
# map the host's current-directory/postresql/data to postgresql's data
2429
- ./postgresql/data:/var/lib/postgresql/data
2530
environment:
2631
- POSTGRES_USER=BootForum

0 commit comments

Comments
 (0)