You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.4 KiB

FROM debian:buster-slim
## install dependencies
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y sudo vim nano locales unzip && \
apt-get install -y python-dev python-pip libpq-dev libgeos-dev python3 python3-pip unzip && \
apt-get install -y python3-venv git npm wget postgresql-client && \
localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8 && \
apt-get clean
## set envs
ENV LANG fr_FR.utf8
ENV TERM xterm
RUN adduser --uid 1000 --gecos "" --disabled-password appuser
RUN usermod -aG sudo appuser
RUN echo "appuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
COPY vendor/TaxHub/ /home/appuser/taxhub/
COPY patches/taxhub/ /home/appuser/taxhub/
COPY patches/taxhub/ /home/appuser/taxhub/
COPY patches/taxhub/ /home/appuser/taxhub/
COPY patches/taxhub/settings.ini /home/appuser/taxhub/settings.ini
RUN chown -R appuser:appuser /home/appuser
USER appuser
WORKDIR /home/appuser/taxhub/
ENV VIRTUAL_ENV=/home/appuser/taxhub/venv/
RUN python3 -m venv $VIRTUAL_ENV
RUN /bin/bash
# Install dependencies:
RUN pip install -r requirements.txt
RUN cp static/app/constants.js.sample static/app/constants.js
RUN cd static && npm install
CMD ["python", " ", "runserver"]