Added volumes to docker-compose project

This commit is contained in:
Mia Rose Winter 2024-01-13 13:59:50 +01:00
parent b0b30a75b4
commit 4570124a83
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
2 changed files with 8 additions and 1 deletions

View file

@ -21,4 +21,5 @@ RUN dotnet publish "./Wave.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:Us
FROM base AS final FROM base AS final
WORKDIR /app WORKDIR /app
COPY --from=publish /app/publish . COPY --from=publish /app/publish .
RUN mkdir ./files
ENTRYPOINT ["dotnet", "Wave.dll"] ENTRYPOINT ["dotnet", "Wave.dll"]

View file

@ -14,6 +14,8 @@ services:
- database:db - database:db
environment: environment:
- "WAVE_ConnectionStrings__DefaultConnection=Host=db; Username=wave; Password=development" - "WAVE_ConnectionStrings__DefaultConnection=Host=db; Username=wave; Password=development"
volumes:
- wave-files:/app/files
networks: networks:
- wave - wave
database: database:
@ -23,9 +25,13 @@ services:
- "POSTGRES_DB=wave" - "POSTGRES_DB=wave"
- "POSTGRES_USER=wave" - "POSTGRES_USER=wave"
- "POSTGRES_PASSWORD=development" - "POSTGRES_PASSWORD=development"
volumes:
- wave-db:/var/lib/postgresql
networks: networks:
- wave - wave
volumes:
wave-files:
wave-db:
networks: networks:
wave: wave: