-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.app
More file actions
39 lines (24 loc) · 796 Bytes
/
Copy pathDockerfile.app
File metadata and controls
39 lines (24 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# base image
FROM python:3.13-slim AS base-image
ENV WORK_FOLDER=/app/bot
ENV CONFIG_FOLDER=${WORK_FOLDER}/config
ENV SOURCE_FOLDER=${WORK_FOLDER}/src
ENV SOURCE_BOT_FOLDER=${SOURCE_FOLDER}/discord_bot
WORKDIR $WORK_FOLDER
COPY requirements.txt ./
COPY src/ ./src
COPY messages.json ./messages.json
COPY config/ ./config
ENV PYTHONPATH=${SOURCE_FOLDER}:${SOURCE_BOT_FOLDER}
RUN pip install --no-cache-dir -r requirements.txt
RUN echo $PYTHONPATH
# debug image
FROM base-image AS debug-image
# デバッグ用ポート解放
# EXPOSE 5678
# デバッグ待機状態にする
# 未完成
# CMD [ "python", "-m", "debugpy", "--wait-for-client", "--listen", "5678", "-m" "bot" ]
# production image
FROM base-image AS production-image
CMD [ "python", "-u", "-m", "src.discord_bot.bot"]