Add env vars to docker image

This commit is contained in:
ekzyis 2021-11-04 00:59:52 +01:00
parent 6abc9a0c64
commit 85ec8c95a5
2 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,9 @@ RUN pip install -r requirements.txt
ARG GIT_COMMIT=unset
ARG DISCORD_BOT_TOKEN=unset
ARG YOUTUBE_COOKIES=unset
ARG DISCORD_LOG_CHANNEL_ID=unset
ARG DISCORD_LOG_CHANNEL_CLEAR_ON_STARTUP=unset
ENV DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN} YOUTUBE_COOKIES=${YOUTUBE_COOKIES} GIT_COMMIT=${GIT_COMMIT}
ENV DISCORD_LOG_CHANNEL_ID=${DISCORD_LOG_CHANNEL_ID} DISCORD_LOG_CHANNEL_CLEAR_ON_STARTUP=${DISCORD_LOG_CHANNEL_CLEAR_ON_STARTUP}
CMD ["python", "src/bot.py"]

View File

@ -10,5 +10,7 @@ build:
--build-arg DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN} \
--build-arg YOUTUBE_COOKIES=${YOUTUBE_COOKIES} \
--build-arg GIT_COMMIT=${GIT_COMMIT} \
--build-arg DISCORD_LOG_CHANNEL_ID=${DISCORD_LOG_CHANNEL_ID} \
--build-arg DISCORD_LOG_CHANNEL_CLEAR_ON_STARTUP=${DISCORD_LOG_CHANNEL_CLEAR_ON_STARTUP} \
-t musicube:${GIT_COMMIT} -t musicube:latest \
.