Browse Source

Docker debug (#1072)

* Habilita debug

* point to experimental tag

* Fix dev-requirements.txt

* Bumping sass processor

* Change bower install call
pull/1077/head
Edward 8 years ago
committed by GitHub
parent
commit
93cf2b36f3
  1. 5
      Dockerfile
  2. 2
      config/env-sample
  3. 2
      config/env_dockerfile
  4. 2
      requirements/requirements.txt
  5. 2
      start.sh

5
Dockerfile

@ -33,9 +33,8 @@ COPY config/env_dockerfile /var/interlegis/sapl/sapl/.env
# manage.py bower install bug: https://github.com/nvbn/django-bower/issues/51 # manage.py bower install bug: https://github.com/nvbn/django-bower/issues/51
RUN python3 manage.py bower_install -- --allow-root --no-input && \ RUN python3 manage.py bower_install -- --allow-root --no-input && \
python3 manage.py collectstatic --no-input python3 manage.py collectstatic --no-input && \
rm -rf /var/interlegis/sapl/sapl/.env && \
RUN rm -rf /var/interlegis/sapl/sapl/.env && \
rm -rf /var/interlegis/sapl/sapl.db rm -rf /var/interlegis/sapl/sapl.db
RUN chmod +x /var/interlegis/sapl/start.sh && \ RUN chmod +x /var/interlegis/sapl/start.sh && \

2
config/env-sample

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

2
config/env_dockerfile

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

2
requirements/requirements.txt

@ -15,7 +15,7 @@ django-extra-views==0.8.0
django-filter==0.15.3 django-filter==0.15.3
django-floppyforms==1.6.2 django-floppyforms==1.6.2
django-model-utils==2.5 django-model-utils==2.5
django-sass-processor==0.5.3 django-sass-processor==0.5.4
djangorestframework djangorestframework
drfdocs drfdocs
easy-thumbnails==2.3 easy-thumbnails==2.3

2
start.sh

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

Loading…
Cancel
Save