mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
Make the dockerfile work for real
This commit is contained in:
1
.python-version
Normal file
1
.python-version
Normal file
@@ -0,0 +1 @@
|
||||
3.10
|
||||
@@ -1,4 +1,4 @@
|
||||
# build frontend
|
||||
# Build frontend
|
||||
FROM node:lts-alpine as front-build-stage
|
||||
WORKDIR /front
|
||||
COPY ./frontend/package*.json .
|
||||
@@ -6,7 +6,7 @@ RUN npm install
|
||||
COPY ./frontend .
|
||||
RUN npm run build
|
||||
|
||||
# setup frontend
|
||||
# Setup frontend
|
||||
FROM ubuntu/nginx:1.18-22.04_edge as production-stage
|
||||
ARG WEBSERVER_FOLDER=/var/www/html
|
||||
COPY --from=front-build-stage /front/dist ${WEBSERVER_FOLDER}
|
||||
@@ -15,7 +15,7 @@ RUN mkdir -p ${WEBSERVER_FOLDER}/assets/romm && \
|
||||
ln -s /romm/library ${WEBSERVER_FOLDER}/assets/romm/library && \
|
||||
ln -s /romm/resources ${WEBSERVER_FOLDER}/assets/romm/resources
|
||||
|
||||
# setup backend
|
||||
# Setup backend
|
||||
RUN apt update && \
|
||||
apt install -y --no-install-recommends ca-certificates curl gnupg && \
|
||||
# add deadsnakes ppa for Python versions
|
||||
@@ -28,17 +28,18 @@ RUN apt update && \
|
||||
apt autoremove && \
|
||||
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
||||
WORKDIR /back
|
||||
COPY ./pyproject.toml ./poetry.lock .
|
||||
RUN pip install --no-cache --upgrade pip && \
|
||||
pip install --no-cache poetry && \
|
||||
poetry config virtualenvs.create false && \
|
||||
poetry install --no-dev --no-interaction --no-ansi
|
||||
poetry install --no-interaction --no-ansi --only main
|
||||
COPY ./backend .
|
||||
|
||||
# setup init script and config files
|
||||
# Setup init script and config files
|
||||
COPY ./docker/init_scripts/* /
|
||||
COPY ./docker/nginx/default.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Expose ports and start
|
||||
EXPOSE 80
|
||||
|
||||
WORKDIR /romm
|
||||
CMD ["/init"]
|
||||
|
||||
4
poetry.lock
generated
4
poetry.lock
generated
@@ -726,5 +726,5 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)",
|
||||
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.11"
|
||||
content-hash = "c61eb84d70a5d341b1811c9429e2d464f21f4d25d7de5dfd15bf2a7e34dacf55"
|
||||
python-versions = "^3.10"
|
||||
content-hash = "75fdf927f51c8897cfc9bce522da9452e7b627c15b90d3fde523c100efd2a666"
|
||||
|
||||
@@ -6,7 +6,7 @@ authors = ["Your Name <you@example.com>"]
|
||||
readme = "README.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.11"
|
||||
python = "^3.10"
|
||||
requests = "^2.30.0"
|
||||
fastapi = "^0.95.1"
|
||||
uvicorn = "^0.22.0"
|
||||
|
||||
Reference in New Issue
Block a user