|
|
|
|
|
|
|
FROM nikolaik/python-nodejs:python3.10-nodejs18 |
|
|
|
|
|
|
|
USER root |
|
|
|
RUN apt-get -y update && apt-get -y install nginx |
|
|
|
RUN mkdir -p /var/cache/nginx \ |
|
/var/log/nginx \ |
|
/var/lib/nginx |
|
RUN touch /var/run/nginx.pid |
|
|
|
RUN chown -R pn:pn /var/cache/nginx \ |
|
/var/log/nginx \ |
|
/var/lib/nginx \ |
|
/var/run/nginx.pid |
|
|
|
|
|
USER pn |
|
ENV HOME=/home/pn \ |
|
PATH=/home/pn/.local/bin:$PATH |
|
|
|
RUN mkdir $HOME/app |
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
RUN curl -fsSL https://bun.sh/install | bash |
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade pynecone |
|
|
|
|
|
|
|
COPY --chown=pn requirements.txt requirements.txt |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
RUN pc init |
|
|
|
|
|
|
|
|
|
RUN python -c "from pathlib import Path; from pynecone.utils import setup_frontend; setup_frontend(Path.cwd())" |
|
|
|
|
|
COPY --chown=pn pcconfig_docker.py pcconfig.py |
|
COPY --chown=pn news_pynecone news_pynecone |
|
COPY --chown=pn assets assets |
|
|
|
|
|
RUN python -c "from pathlib import Path; from pynecone.utils import setup_frontend; setup_frontend(Path.cwd())" |
|
|
|
|
|
COPY --chown=pn nginx.conf /etc/nginx/sites-available/default |
|
|
|
|
|
COPY --chown=pn README.md README.md |
|
COPY --chown=pn run.sh . |
|
|
|
|
|
CMD ["bash", "run.sh"] |