Select Git revision
basic-contact-line.mustache
Dockerfile 947 B
FROM python:3.11
RUN mkdir /app
RUN curl -fsSL https://deb.nodesource.com/setup_19.x | bash -
RUN apt-get -y install make autoconf automake libtool pkg-config nodejs git python3-pip
RUN rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
# Install Python reqs
RUN cd server; pip install -r requirements/base.txt
# Install Node.js reqs
RUN cd frontend; npm install
# Build and copy files
RUN cd frontend; \
npm run build; \
rm -fr ../server/server/templates ../server/server/static; \
mkdir ../server/server/templates ../server/server/static; \
cp dist/index.html ../server/server/templates/; \
cp dist/static/* ../server/server/static/; \
cp dist/favicon.ico ../server/server/static/; \
rm -fr dist
RUN bash -c "adduser --disabled-login --quiet --gecos app app && \
chmod -R o+r /app/ && \
chmod o+x /app/server/run.sh"
USER app
WORKDIR /app/server
EXPOSE 8000
CMD ["bash", "run.sh"]