-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
84 lines (65 loc) · 2.25 KB
/
Copy pathDockerfile
File metadata and controls
84 lines (65 loc) · 2.25 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
FROM node:23-alpine3.20
LABEL maintainer="Julian Gabriel Ruf <rufju@informatik.uni-freiburg.de>"
RUN apk update
RUN apk add git openssh python3 py3-pip make sqlite curl caddy openssl bash
RUN npm install -g npm@11.1.0
# setup python
RUN mkdir -p /workspaces/bookfinder-venv
WORKDIR /workspaces/bookfinder-venv
RUN python3 -m venv .venv && \
source .venv/bin/activate && \
pip install \
mypy==1.19.1 \
pytest==9.0.2 \
ruff==0.15.7 \
Flask==3.1.3 \
Flask_Cors==4.0.0 \
types-Flask-Cors==6.0.0.20250809 \
pysqlite3==0.6.0 \
requests==2.31.0 \
types-requests==2.32.4.20260107 \
defusedxml==0.7.1 \
camel-converter==5.1.0 \
isbnlib==3.10.14 \
http-constants==0.5.0 \
pillow==12.2.0 \
fixtures==4.3.2 \
requests-mock==1.12.1 \
gunicorn==26.0.0 \
pendulum==3.2.0 \
python-dateutil==2.9.0.post0 \
six==1.17.0 \
tzdata==2026.3
WORKDIR /workspaces/bookfinder
# Copy package files from cached layer (tsserver would be slow if package were within the bind mount)
COPY frontend/package*.json ./frontend/
RUN cd frontend && npm install
# Copy all files
COPY . /workspaces/bookfinder
WORKDIR /workspaces/bookfinder
# Create TLS certificate, build frontend, update shelf database
# Creates new files and changes the database file.
# These files and changes will only be seen in the container,
# if they are not bind mounted to the host.
# If a bind mount is used (e.g. by using a devcontainer),
# you need to run 'make setup' again in the container.
# For the devcontainer, this is done automatically by the
# devcontainer.json postCreateCommand.
RUN make setup
CMD ["/bin/bash", "--rcfile", "bashrc"]
# BUILD INSTRUCTIONS
# Approximate runtime for docker build: 2-3 minutes
# (depending on the machine and internet connection)
# git clone https://github.com/JRuf02/bookfinder.git
# cd bookfinder
# docker build -t julian-ruf-project .
# docker run -it -p 5173:5173 -p 5000:5000 -p 443:443 --name julian-ruf-project julian-ruf-project
# make help
# make run-prod
# Then open https://localhost/ in a browser of your choice.
# EXIT THE CONTAINER
# ctrl + c
# ctrl + ad
# ADDITIONAL COMMANDS
# Start without rebuilding (if docker build and docker run have already been executed):
# docker start -ai julian-ruf-project