Mixonomer/Dockerfile

38 lines
769 B
Docker
Raw Normal View History

2023-08-08 17:56:49 +01:00
FROM node:20-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
RUN npm run build --if-present
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
RUN pip install poetry
RUN poetry config virtualenvs.create false
WORKDIR /mixonomer
COPY pyproject.toml .
COPY poetry.lock .
RUN poetry install
RUN poetry add gunicorn
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" ]