Skip to content

Commit 0674f1d

Browse files
committed
Update dockerfile
1 parent 0da3541 commit 0674f1d

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ ADD manage.py deploy/requirements.txt deploy/settings.py setup.py urls.py deploy
66
ADD silverstrike /app/silverstrike
77

88
# install deps
9-
RUN apt-get update -y && apt-get install -y gcc libmariadb-dev python3-dev libffi-dev && \
10-
pip install --no-cache-dir -r requirements.txt && python setup.py install && apt-get remove -y gcc && apt-get autoremove -y
9+
RUN apt-get update -y && apt-get install -y gcc libmariadb-dev python3-dev libffi-dev pkg-config && \
10+
pip install --no-cache-dir -r requirements.txt && python setup.py install && apt-get remove -y gcc pkg-config && apt-get autoremove -y
1111

1212
# configure uwsgi and django
1313
ENV DJANGO_SETTINGS_MODULE=settings UWSGI_WSGI_FILE=wsgi.py UWSGI_HTTP=:8000 UWSGI_MASTER=1 UWSGI_WORKERS=2 UWSGI_THREADS=8 UWSGI_LAZY_APPS=1 UWSGI_WSGI_ENV_BEHAVIOR=holy

deploy/settings.py

+5
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@
170170
'()': 'django.utils.log.RequireDebugTrue',
171171
}
172172
},
173+
'django': {
174+
'handlers': ['console'],
175+
'propagate': True,
176+
'level': 'ERROR'
177+
},
173178
'handlers': {
174179
'console': {
175180
'level': 'DEBUG',

docker-compose.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ services:
66
dockerfile: Dockerfile
77
restart: always
88
environment:
9-
# - SECRET_KEY=REPLACE_ME
9+
- SECRET_KEY=REPLACE_ME # replace this with a randomly generated value. Especially if running in production
1010
- DATABASE_URL=sqlite:////data/db.sqlite3
1111
# - DATABASE_URL=mysql://agsuser:agspassword@mariadb/agsdb
1212
# - DATABASE_URL=postgres://agsuser:rootpassword@postgresdb/agsdb
13-
- ALLOWED_HOST=example.com
14-
- CSRF_TRUSTED_ORIGIN=https://example.com
13+
- ALLOWED_HOST=localhost # replace with used hostname
14+
- CSRF_TRUSTED_ORIGIN=http://localhost:21000 # replace with used origin
1515
ports:
1616
- "21000:8000"
1717
volumes:

0 commit comments

Comments
 (0)