Skip to content

Commit 36fa5a7

Browse files
committed
Only volumes/data for logs
1 parent 18aed6f commit 36fa5a7

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ WORKDIR /home/runner
1010

1111
# Extract from .tar and copy the app files from host machine to image filesystem
1212
ADD hello/build/distributions/hello-*.tar .
13-
RUN mv hello-* app && chown -R runner:runner-group app
13+
RUN mv hello-* app && mkdir app/data && chown -R runner:runner-group app
1414

1515
# Switch to the custom user
1616
USER runner

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
container_name: simple-app
44
image: a002k/simple-app:latest
55
volumes:
6-
- simple-app:/home/runner/
6+
- simple-app:/home/runner/app/data
77

88
volumes:
99
simple-app:

hello/src/main/resources/logback.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<property name="LOG_FILE" value="logback"/>
1111
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
12-
<file>${LOG_FILE}.log</file>
12+
<file>data/${LOG_FILE}.log</file>
1313
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
1414
<!-- daily rollover -->
1515
<fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.gz</fileNamePattern>

0 commit comments

Comments
 (0)