Mixonomer/Dockerfile

38 lines
771 B
Docker
Raw Permalink Normal View History

2024-07-20 12:32:28 +01:00
FROM node:22.5.1-alpine AS js-build
2023-05-02 08:58:34 +01:00
RUN npm install -g sass
COPY ./package.json /mixonomer/
COPY ./package-lock.json /mixonomer/
COPY ./webpack.common.js /mixonomer/
COPY ./webpack.prod.js /mixonomer/
COPY ./.babelrc /mixonomer/
COPY ./src /mixonomer/src/
WORKDIR /mixonomer
RUN npm ci
2024-07-20 11:49:47 +01:00
RUN npm run build
2023-05-02 08:58:34 +01:00
RUN sass src/scss/style.scss build/style.css
2023-08-08 17:56:49 +01:00
FROM python:3.11-slim as py
2023-05-02 08:58:34 +01:00
2024-07-20 11:35:49 +01:00
RUN pip install poetry==1.8.3
2023-05-02 08:58:34 +01:00
RUN poetry config virtualenvs.create false
WORKDIR /mixonomer
COPY pyproject.toml .
COPY poetry.lock .
RUN poetry install
2023-09-05 21:22:07 +01:00
RUN poetry add gunicorn@^20
2023-05-02 08:58:34 +01:00
COPY ./music ./music
COPY gunicorn.conf.py gunicorn.conf.py
2023-05-02 08:58:34 +01:00
COPY main.api.py main.py
COPY --from=js-build /mixonomer/build ./build/
EXPOSE 80
#Run the container
ENTRYPOINT [ "poetry", "run", "gunicorn" ]