Browse Source

Fix das variáveis de DEBUG do último commit(#1072) e adiciona o comando compilescss no Dockerfile, para compilar os arquivos SASS/SCSS em ambiente de produção.

pull/1080/head
Matheus Veleci 8 years ago
parent
commit
d19d6cf6e2
  1. 3
      Dockerfile
  2. 2
      config/env-sample
  3. 2
      config/env_dockerfile
  4. 2
      start.sh

3
Dockerfile

@ -32,7 +32,10 @@ COPY config/env_dockerfile /var/interlegis/sapl/sapl/.env
# manage.py bower install bug: https://github.com/nvbn/django-bower/issues/51
# compilescss - Precompile all occurrences of your SASS/SCSS files for the whole project into css files
RUN python3 manage.py bower_install -- --allow-root --no-input && \
python3 manage.py compilescss && \
python3 manage.py collectstatic --no-input && \
rm -rf /var/interlegis/sapl/sapl/.env && \
rm -rf /var/interlegis/sapl/sapl.db

2
config/env-sample

@ -1,6 +1,6 @@
DATABASE_URL = postgresql://postgres:@sapldb:/sapl
KEY
DEBUG = True
DEBUG = False
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST = ''

2
config/env_dockerfile

@ -1,6 +1,6 @@
DATABASE_URL = sqlite:///sapl.db
SECRET_KEY = 'Dockerfile_Key'
DEBUG = True
DEBUG = False
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST = ''

2
start.sh

@ -27,7 +27,7 @@ create_env() {
echo "SECRET_KEY="$KEY > $FILENAME
# now only appends
echo "DATABASE_URL = "$DATABASE_URL >> $FILENAME
echo "DEBUG = ""${DEBUG-True}" >> $FILENAME
echo "DEBUG = ""${DEBUG-False}" >> $FILENAME
echo "EMAIL_USE_TLS = ""${USE_TLS-True}" >> $FILENAME
echo "EMAIL_PORT = ""${EMAIL_PORT-587}" >> $FILENAME
echo "EMAIL_HOST = ""${EMAIL_HOST-''}" >> $FILENAME

Loading…
Cancel
Save