# Docker enhancement
* adds logging for gunicorn by default * adds image tagging * drops docker-compose environment setting in favor of .env usage (needs to be copied from .env.sample)
This commit is contained in:
parent
f8c803b401
commit
513f10eef1
@ -16,6 +16,9 @@ RUN pip install -r requirements.txt
|
|||||||
RUN rm /etc/nginx/sites-enabled/default
|
RUN rm /etc/nginx/sites-enabled/default
|
||||||
COPY ./nginx.conf /etc/nginx/conf.d
|
COPY ./nginx.conf /etc/nginx/conf.d
|
||||||
|
|
||||||
|
# Create log folders
|
||||||
|
RUN mkdir /var/log/gunicorn
|
||||||
|
|
||||||
# Copy rest of project into workspace
|
# Copy rest of project into workspace
|
||||||
COPY . /konova/
|
COPY . /konova/
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ services:
|
|||||||
- postgis:db
|
- postgis:db
|
||||||
- arnova-nginx-server:arnova
|
- arnova-nginx-server:arnova
|
||||||
build: .
|
build: .
|
||||||
|
image: "ksp/konova:1.7"
|
||||||
container_name: "konova-docker"
|
container_name: "konova-docker"
|
||||||
command: ./docker-entrypoint.sh
|
command: ./docker-entrypoint.sh
|
||||||
restart: always
|
restart: always
|
||||||
@ -13,17 +14,6 @@ services:
|
|||||||
- /data/apps/konova/uploaded_files:/konova_uploaded_files
|
- /data/apps/konova/uploaded_files:/konova_uploaded_files
|
||||||
ports:
|
ports:
|
||||||
- "1337:80"
|
- "1337:80"
|
||||||
environment:
|
|
||||||
- POSTGRES_NAME=konova
|
|
||||||
- POSTGRES_PORT=5432
|
|
||||||
- POSTGRES_PASSWORD=CHANGE_ME
|
|
||||||
- POSTGRES_USER=konova
|
|
||||||
- POSTGRES_HOST=db
|
|
||||||
- REDIS_HOST=localhost
|
|
||||||
- SSO_HOST=CHANGE_ME_TO_SSO_HOST_URL
|
|
||||||
- SMTP_HOST=172.17.0.1
|
|
||||||
- SMTP_PORT=25
|
|
||||||
- SMTP_REAL_REPLY_MAIL=ksp-servicestelle@sgdnord.rlp.de
|
|
||||||
|
|
||||||
# Instead of an own, new network, we need to connect to the existing one, which is provided by the postgis container
|
# Instead of an own, new network, we need to connect to the existing one, which is provided by the postgis container
|
||||||
# NOTE: THIS NETWORK MUST EXIST
|
# NOTE: THIS NETWORK MUST EXIST
|
||||||
|
@ -4,4 +4,4 @@ service nginx start
|
|||||||
service redis-server start
|
service redis-server start
|
||||||
celery -A konova worker --detach
|
celery -A konova worker --detach
|
||||||
# Rule of thumb: (2*CPU)+1 as worker_num -> Use 5 as default (matches a dual core)
|
# Rule of thumb: (2*CPU)+1 as worker_num -> Use 5 as default (matches a dual core)
|
||||||
gunicorn --workers=5 konova.wsgi:application --bind=0.0.0.0:8000
|
gunicorn --workers=5 konova.wsgi:application --bind=0.0.0.0:8000 --access-logfile /var/log/gunicorn/access.log --error-logfile /var/log/gunicorn/error.log
|
Loading…
Reference in New Issue
Block a user