Skip to content

Commit

Permalink
Move beatmaps directory to /beatmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Syriiin committed May 2, 2024
1 parent 77d0620 commit 5382258
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
environment:
- REDIS_CONFIGURATION=cache:6379
volumes:
- beatmaps:/home/app/beatmaps
- beatmaps:/beatmaps
depends_on:
- cache

Expand All @@ -17,7 +17,7 @@ services:
environment:
- REDIS_CONFIGURATION=cache:6379
volumes:
- beatmaps:/home/app/beatmaps
- beatmaps:/beatmaps
depends_on:
- cache

Expand All @@ -28,7 +28,7 @@ services:
environment:
- REDIS_CONFIGURATION=cache:6379
volumes:
- beatmaps:/home/app/beatmaps
- beatmaps:/beatmaps
depends_on:
- cache

Expand All @@ -39,7 +39,7 @@ services:
environment:
- REDIS_CONFIGURATION=cache:6379
volumes:
- beatmaps:/home/app/beatmaps
- beatmaps:/beatmaps
depends_on:
- cache

Expand Down
9 changes: 4 additions & 5 deletions docs/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
ports:
- 5000:80
volumes:
- beatmaps:/home/app/beatmaps
- beatmaps:/beatmaps
depends_on:
- cache

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 5382258

Please sign in to comment.