Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ STRAVA_CLIENT_SECRET=replace-me
STRAVA_REFRESH_TOKEN=replace-me

BLACKFIRE_CLIENT_ID=replace-me
BLACKFIRE_CLIENT_TOKEN=replace-me
BLACKFIRE_CLIENT_TOKEN=replace-me

#PUID=1000
#PGID=1000
3 changes: 3 additions & 0 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ RUN set -eux; \

COPY docker/app/config/php.ini ${PHP_INI_DIR}/php.ini
COPY docker/app/config/Caddyfile /etc/frankenphp/Caddyfile
COPY docker/app/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
ENV COMPOSER_ALLOW_SUPERUSER=1
Expand All @@ -59,4 +61,5 @@ RUN tar -xzf shoutrrr.tar.gz
RUN chmod +x shoutrrr
RUN mv shoutrrr /usr/bin/shoutrrr && rm shoutrrr.tar.gz

ENTRYPOINT ["docker-entrypoint.sh"]
CMD [ "frankenphp", "run", "--config", "/etc/frankenphp/Caddyfile" ]
13 changes: 13 additions & 0 deletions docker/app/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e

if [ -n "$PUID" ] && [ -n "$PGID" ] && [ "$(id -u)" = "0" ]; then
echo "Fixing permissions for PUID=$PUID PGID=$PGID..."

chown -R "$PUID:$PGID" \
/var/www \
/config/caddy \
/data/caddy || true
fi

exec "$@"
4 changes: 4 additions & 0 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ STRAVA_REFRESH_TOKEN=YOUR_REFRESH_TOKEN_OBTAINED_AFTER_AUTH_FLOW
# Valid timezones can found under TZ Identifier column here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
TZ=Etc/GMT

# Uncomment and set these to run the container as a non-root user.
# PUID=your host UID
# PGID=your host GID

# !! IMPORTANT If you want to serve Statistics for Strava from a custom domain (not localhost),
# uncomment the following lines and configure them accordingly:

Expand Down