File tree Expand file tree Collapse file tree 3 files changed +21
-8
lines changed
Expand file tree Collapse file tree 3 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,6 @@ RUN mkdir ./data ./app && \
2828FROM alpine:3
2929WORKDIR /app
3030
31- # Note: we're intentionally not running as `app` user, because see https://github.com/muety/wakapi/issues/769.
32- # The entrypoint script will take care of starting the wakapi process as `app` instead.
33-
3431RUN addgroup -g 1000 app && \
3532 adduser -u 1000 -G app -s /bin/sh -D app && \
3633 apk add --no-cache bash ca-certificates tzdata
@@ -56,6 +53,8 @@ LABEL org.opencontainers.image.url="https://github.com/muety/wakapi" \
5653 org.opencontainers.image.licenses="MIT" \
5754 org.opencontainers.image.description="A minimalist, self-hosted WakaTime-compatible backend for coding statistics"
5855
56+ USER app
57+
5958EXPOSE 3000
6059
6160ENTRYPOINT /app/entrypoint.sh
Original file line number Diff line number Diff line change @@ -15,9 +15,23 @@ services:
1515 WAKAPI_PASSWORD_SALT_FILE : " /run/secrets/password_salt" # alternatively, set WAKAPI_PASSWORD_SALT directly without the use of secrets
1616 WAKAPI_MAIL_SMTP_PASS_FILE : " /run/secrets/smtp_pass" # alternatively, set WAKAPI_MAIL_SMTP_PASS directly without the use of secrets
1717 secrets :
18- - password_salt
19- - smtp_pass
20- - db_password
18+ - source : password_salt
19+ target : password_salt
20+ uid : ' 1000'
21+ gid : ' 1000'
22+ mode : ' 0400'
23+
24+ - source : smtp_pass
25+ target : smtp_pass
26+ uid : ' 1000'
27+ gid : ' 1000'
28+ mode : ' 0400'
29+
30+ - source : db_password
31+ target : db_password
32+ uid : ' 1000'
33+ gid : ' 1000'
34+ mode : ' 0400'
2135
2236 db :
2337 image : postgres:17
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ file_env "WAKAPI_SUBSCRIPTIONS_STRIPE_SECRET_KEY"
2929file_env " WAKAPI_SUBSCRIPTIONS_STRIPE_ENDPOINT_SECRET"
3030
3131if [ " $WAKAPI_DB_TYPE " == " sqlite3" ] || [ " $WAKAPI_DB_TYPE " == " " ]; then
32- exec su -c " ./wakapi" app
32+ exec ./wakapi
3333else
3434 echo " Waiting for database to come up"
35- exec ./wait-for-it.sh " $WAKAPI_DB_HOST :$WAKAPI_DB_PORT " -s -t 60 -- su -c " ./wakapi" app
35+ exec ./wait-for-it.sh " $WAKAPI_DB_HOST :$WAKAPI_DB_PORT " -s -t 60 -- ./wakapi
3636fi
You can’t perform that action at this time.
0 commit comments