-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5fbb05e
commit b86617f
Showing
3 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,4 @@ dev.sh | |
start.sh | ||
run.sh | ||
nohup.out | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 使用官方的 Elixir 镜像作为基础镜像 | ||
FROM elixir:1.17.2 | ||
|
||
# 安装必要的依赖 | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
build-essential \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# 设置工作目录 | ||
WORKDIR /app | ||
|
||
# 复制 mix.exs 和 mix.lock 文件并安装依赖 | ||
COPY mix.exs mix.lock ./ | ||
RUN mix do local.hex --force, local.rebar --force, deps.get | ||
|
||
# 复制剩余的项目文件 | ||
COPY . . | ||
|
||
# 设置环境变量(如果需要在运行时指定,可以在 docker run 命令中传递) | ||
ENV TELEGRAM_BOT_TOKEN=$TELEGRAM_BOT_TOKEN | ||
ENV AIER_API_TOKEN=$AIER_API_TOKEN | ||
ENV OPENAI_API_KEY=$OPENAI_API_KEY | ||
|
||
# 运行项目 | ||
CMD ["mix", "run", "--no-halt"] |
This file was deleted.
Oops, something went wrong.