You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 27, 2024. It is now read-only.
## It's possible to separate out the above from the below to not recreate the cert each time, but requires a secure container registry to store the output in
## In that scenario, you'd make the below `FROM` the output of above.
#setup nginx
COPY nginx-conf langar.conf.template
WORKDIR /etc/nginx/sites-available
RUN envsubst '${DOMAIN}' < /tmp/langar.conf.template > langar.conf
WORKDIR /etc/nginx/sites-enabled
RUN ln -s ../sites-available/langar.conf .
RUN rm default
RUN certbot install --nginx -d ${DOMAIN} --cert-name=${DOMAIN} --redirect
## setup app
WORKDIR ${INSTALL_DIR}
COPY pyproject.toml .
RUN poetry install
COPY . .
ENV PYTHONUNBUFFERED=1
CMD nginx && poetry run langar_db && poetry run gunicorn --enable-stdio-inheritance -w 1 langar.app:app