mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
dev: creds_example.yml will now be in the docker's data dir/volume
This commit is contained in:
@@ -5,6 +5,7 @@ WORKDIR /source
|
|||||||
# Copy the .csproj files for each project
|
# Copy the .csproj files for each project
|
||||||
COPY src/Nadeko.Medusa/*.csproj src/Nadeko.Medusa/
|
COPY src/Nadeko.Medusa/*.csproj src/Nadeko.Medusa/
|
||||||
COPY src/NadekoBot/*.csproj src/NadekoBot/
|
COPY src/NadekoBot/*.csproj src/NadekoBot/
|
||||||
|
COPY src/NadekoBot/creds_example.yml src/NadekoBot/
|
||||||
COPY src/NadekoBot.Coordinator/*.csproj src/NadekoBot.Coordinator/
|
COPY src/NadekoBot.Coordinator/*.csproj src/NadekoBot.Coordinator/
|
||||||
COPY src/NadekoBot.Generators/*.csproj src/NadekoBot.Generators/
|
COPY src/NadekoBot.Generators/*.csproj src/NadekoBot.Generators/
|
||||||
COPY src/NadekoBot.Voice/*.csproj src/NadekoBot.Voice/
|
COPY src/NadekoBot.Voice/*.csproj src/NadekoBot.Voice/
|
||||||
@@ -43,6 +44,12 @@ RUN set -xe; \
|
|||||||
apt-get autoremove -y; \
|
apt-get autoremove -y; \
|
||||||
apt-get autoclean -y
|
apt-get autoclean -y
|
||||||
|
|
||||||
|
# Copy creds_example.yml from the build stage
|
||||||
|
COPY --from=build /source/src/NadekoBot/creds_example.yml /source/src/NadekoBot/
|
||||||
|
|
||||||
|
# Check if creds.yml exists, if not, copy and rename creds_example.yml
|
||||||
|
RUN mkdir -p /app/data && if [ ! -f /app/data/creds.yml ]; then cp /source/src/NadekoBot/creds_example.yml /app/data/creds.yml; fi
|
||||||
|
|
||||||
# Copy the built application and the entrypoint script from the build stage
|
# Copy the built application and the entrypoint script from the build stage
|
||||||
COPY --from=build /app ./
|
COPY --from=build /app ./
|
||||||
COPY docker-entrypoint.sh /usr/local/sbin
|
COPY docker-entrypoint.sh /usr/local/sbin
|
||||||
@@ -57,4 +64,4 @@ VOLUME [ "/app/data" ]
|
|||||||
|
|
||||||
# Set the entrypoint and default command
|
# Set the entrypoint and default command
|
||||||
ENTRYPOINT [ "/usr/local/sbin/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/usr/local/sbin/docker-entrypoint.sh" ]
|
||||||
CMD dotnet NadekoBot.dll "$shard_id" "$total_shards"
|
CMD dotnet NadekoBot.dll "$shard_id" "$total_shards"
|
||||||
|
Reference in New Issue
Block a user