Skip to content

Commit

Permalink
Update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
simhnna committed Oct 31, 2024
1 parent 0da3541 commit 0674f1d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ADD manage.py deploy/requirements.txt deploy/settings.py setup.py urls.py deploy
ADD silverstrike /app/silverstrike

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

# configure uwsgi and django
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
Expand Down
5 changes: 5 additions & 0 deletions deploy/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@
'()': 'django.utils.log.RequireDebugTrue',
}
},
'django': {
'handlers': ['console'],
'propagate': True,
'level': 'ERROR'
},
'handlers': {
'console': {
'level': 'DEBUG',
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ services:
dockerfile: Dockerfile
restart: always
environment:
# - SECRET_KEY=REPLACE_ME
- SECRET_KEY=REPLACE_ME # replace this with a randomly generated value. Especially if running in production
- DATABASE_URL=sqlite:////data/db.sqlite3
# - DATABASE_URL=mysql://agsuser:agspassword@mariadb/agsdb
# - DATABASE_URL=postgres://agsuser:rootpassword@postgresdb/agsdb
- ALLOWED_HOST=example.com
- CSRF_TRUSTED_ORIGIN=https://example.com
- ALLOWED_HOST=localhost # replace with used hostname
- CSRF_TRUSTED_ORIGIN=http://localhost:21000 # replace with used origin
ports:
- "21000:8000"
volumes:
Expand Down

0 comments on commit 0674f1d

Please sign in to comment.