Browse Source

Ajusta criação de .env e banco sqlite3 temporários no Dockerfile

pull/1063/head
Matheus Veleci 8 years ago
parent
commit
2e0cfd495d
  1. 8
      Dockerfile
  2. 8
      config/env_dockerfile

8
Dockerfile

@ -28,13 +28,17 @@ RUN pip install -r /var/interlegis/sapl/requirements/requirements.txt --upgrade
rm -r /root/.cache && \
rm -r /tmp/*
COPY config/env_dockerfile /var/interlegis/sapl/sapl/.env
RUN python3 manage.py bower install -- --allow-root && \
python3 manage.py collectstatic --no-input
python3 manage.py collectstatic --no-input && \
rm -rf /var/interlegis/sapl/sapl/.env && \
rm -rf /var/interlegis/sapl/sapl.db
RUN chmod +x /var/interlegis/sapl/start.sh && \
ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log
VOLUME ["/var/interlegis/sapl/data", "/var/interlegis/sapl/media", "/var/interlegis/sapl/collected_static"]
VOLUME ["/var/interlegis/sapl/data", "/var/interlegis/sapl/media"]
CMD ["/var/interlegis/sapl/start.sh"]

8
config/env_dockerfile

@ -0,0 +1,8 @@
DATABASE_URL = sqlite:///sapl.db
SECRET_KEY = 'Dockerfile_Key'
DEBUG = False
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST = ''
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
Loading…
Cancel
Save