forked from project-ryoma/ryoma
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 908 Bytes
/
Dockerfile
File metadata and controls
38 lines (27 loc) · 908 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
# create a basic python image that install poetry and use poetry to install dependencies
# Use the official Python image
FROM python:3.9-slim
# install additional dependencies like unzip
RUN apt-get update && apt-get install -y \
build-essential \
software-properties-common \
unzip \
curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# install poetry
RUN pip install poetry
COPY . /app
# Install the dependencies
RUN poetry install --with dev,aita_lab --all-extras
# Deploy templates and prepare app
RUN poetry run reflex init
# Download all npm dependencies and compile frontend
RUN poetry run reflex export --frontend-only --no-zip
RUN poetry run reflex db migrate
# Needed until Reflex properly passes SIGTERM on backend.
STOPSIGNAL SIGKILL
# Start the application
CMD ["poetry", "run", "reflex", "run", "--env", "prod"]