-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5fd120
commit cb06989
Showing
5 changed files
with
45 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
# Ignore files containing sensitive information | ||
docker-compose.yaml | ||
# Files containing sensitive information | ||
melting_potlist.yaml | ||
.env | ||
|
||
# Ignore git metadata | ||
# Git metadata | ||
.git | ||
.gitignore | ||
|
||
# Docker files | ||
Dockerfile | ||
.dockerignore | ||
docker-compose.yaml | ||
docker-compose.example.yaml | ||
|
||
# Python virtualenv | ||
.venv | ||
|
||
# Node modules | ||
./vue_components/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,33 @@ | ||
FROM nikolaik/python-nodejs:python3.11-nodejs20 | ||
FROM node:lts as vite_build | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
ENV NODE_ENV=production | ||
ENV NODE_OPTIONS=--openssl-legacy-provider | ||
|
||
# Fix Yarnpkg pub keys and install OS packages | ||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | ||
RUN apt-get update && apt-get -y install libpq-dev gcc build-essential | ||
|
||
# Install and configure Poetry | ||
RUN pip install "poetry==1.3.2" | ||
RUN poetry config virtualenvs.create false | ||
|
||
# Install NPM packages using PNPM | ||
RUN npm install -g pnpm | ||
WORKDIR /usr/src/app/vue_components | ||
# RUN mkdir --parents /usr/src/app/vue_components | ||
WORKDIR /build/vue_components | ||
COPY ["./vue_components/package.json", "./vue_components/pnpm-lock.yaml", "./"] | ||
RUN pnpm install --prod | ||
|
||
# Build using vite | ||
COPY ./vue_components ./ | ||
RUN pnpm run build | ||
|
||
|
||
FROM python:3.12 as django_app | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# Install and configure Poetry | ||
RUN pip install "poetry==1.7.0" | ||
RUN poetry config virtualenvs.create false | ||
|
||
# Install Python packages | ||
WORKDIR /usr/src/app | ||
COPY ./pyproject.toml ./poetry.lock ./ | ||
RUN poetry install --only main --no-root --no-interaction --no-ansi | ||
|
||
COPY . /usr/src/app/ | ||
|
||
# Build vue webpack bundle | ||
WORKDIR /usr/src/app/vue_components | ||
RUN pnpm run build | ||
|
||
WORKDIR /usr/src/app | ||
COPY . ./ | ||
COPY --from=vite_build /build/vue_components/dist /usr/src/app/vue_components/dist | ||
ENTRYPOINT ["/usr/src/app/entrypoint.sh"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.