-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile-bot
42 lines (29 loc) · 1.06 KB
/
Dockerfile-bot
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
40
41
FROM python:3.12.7
# Copying dependencies and startup script to the /main/ directory
COPY requirements.txt run_bot.sh /main/
# Copying the 'budget_graph' application bot with dependencies to the /main/app directory
COPY budget_graph /main/budget_graph
WORKDIR /main
# Installing dependencies and required packages
# Installing Python dependencies
RUN pip install --upgrade pip && pip install -r requirements.txt
# Go to the /main/app directory to build the source code
WORKDIR /main/budget_graph
# Build the project
RUN python build_project.py
# Removing unnecessary files after building the project
RUN rm build_project.py \
webapp.py \
sql/create_db.sql \
sql/indexes.sql \
sql/func_auto_count_users_of_group.sql \
sql/func_transaction_number.sql \
sql/update_group_uuid_after_transaction.sql
# Removing some unnecessary directories
RUN rm -rf /static \
/templates \
/logs
# Return to the root directory /main
WORKDIR /main
# Run the run_bot.sh script when the container starts
CMD ["sh", "./run_bot.sh"]