From 53822588c9f47b2e382c88675c5501c54d4e8b4d Mon Sep 17 00:00:00 2001 From: Samuel Cattini-Schultz Date: Fri, 3 May 2024 00:28:02 +1000 Subject: [PATCH] Move beatmaps directory to /beatmaps --- Dockerfile | 8 ++++---- README.md | 5 ++++- docker-compose.yml | 8 ++++---- docs/docs/getting-started.md | 9 ++++----- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 40bed09..82bb535 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,16 +2,16 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine3.19 AS base LABEL org.opencontainers.image.source https://github.com/Syriiin/difficalcy -USER app - WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 ENV ASPNETCORE_ENVIRONMENT=Production -ENV BEATMAP_DIRECTORY=/home/app/beatmaps +ENV BEATMAP_DIRECTORY=/beatmaps VOLUME ${BEATMAP_DIRECTORY} -RUN mkdir ${BEATMAP_DIRECTORY} +RUN mkdir ${BEATMAP_DIRECTORY} && chown -R app:app ${BEATMAP_DIRECTORY} + +USER app FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build WORKDIR /src diff --git a/README.md b/README.md index cd13e4a..be1d54c 100644 --- a/README.md +++ b/README.md @@ -57,15 +57,18 @@ services: ports: - 5000:80 volumes: - - beatmaps:/home/app/beatmaps + - beatmaps:/beatmaps depends_on: - cache cache: image: redis:latest + volumes: + - redis-data:/data volumes: beatmaps: + redis-data: ``` ## Development Setup diff --git a/docker-compose.yml b/docker-compose.yml index 335b3dd..b94981a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: environment: - REDIS_CONFIGURATION=cache:6379 volumes: - - beatmaps:/home/app/beatmaps + - beatmaps:/beatmaps depends_on: - cache @@ -17,7 +17,7 @@ services: environment: - REDIS_CONFIGURATION=cache:6379 volumes: - - beatmaps:/home/app/beatmaps + - beatmaps:/beatmaps depends_on: - cache @@ -28,7 +28,7 @@ services: environment: - REDIS_CONFIGURATION=cache:6379 volumes: - - beatmaps:/home/app/beatmaps + - beatmaps:/beatmaps depends_on: - cache @@ -39,7 +39,7 @@ services: environment: - REDIS_CONFIGURATION=cache:6379 volumes: - - beatmaps:/home/app/beatmaps + - beatmaps:/beatmaps depends_on: - cache diff --git a/docs/docs/getting-started.md b/docs/docs/getting-started.md index f9f927a..e4b9c2d 100644 --- a/docs/docs/getting-started.md +++ b/docs/docs/getting-started.md @@ -11,7 +11,7 @@ services: ports: - 5000:80 volumes: - - beatmaps:/home/app/beatmaps + - beatmaps:/beatmaps depends_on: - cache @@ -72,10 +72,9 @@ By default, the beatmap cache will be on an anonymous volume, and there will be ### Environment Variables -| Environment variable | Default | Description | -| --------------------- | -------------------- | ----------------------------------------------------------------------------------------------- | -| `BEATMAP_DIRECTORY` | `/home/app/beatmaps` | The directory difficalcy uses for storing beatmap files. | -| `REDIS_CONFIGURATION` | | The address of the redis server to use for beatmap caching. By default, there will be no cache. | +| Environment variable | Default | Description | +| --------------------- | ------- | ----------------------------------------------------------------------------------------------- | +| `REDIS_CONFIGURATION` | | The address of the redis server to use for beatmap caching. By default, there will be no cache. | ## Recommended setup