-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (21 loc) · 952 Bytes
/
Dockerfile
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
FROM ghcr.io/reboot-dev/reboot-base:0.22.0
WORKDIR /app
# First ONLY copy and install the requirements, so that changes outside
# `requirements.txt` don't force a re-install of all dependencies.
#
# Note that this will install the Reboot library and CLI.
COPY requirements.lock requirements.txt
RUN pip install -r requirements.txt
# Next, copy the API definition and generate Reboot code. This step is also
# separate so it is only repeated if the `api/` code changes.
COPY api/ api/
COPY .rbtrc .rbtrc
# Run the Reboot code generators. We did copy all of `api/`, possibly
# including generated code, but it's not certain that `rbt protoc` was run in
# that folder before this build was started.
RUN rbt protoc
# Now copy the rest of the source code.
COPY backend/src/ backend/src/
# Running the application requires that we set the PYTHONPATH correctly.
# TODO: Update to use `rbt serve`.
CMD PYTHONPATH=backend/api/ python3 backend/src/main.py