...
 
......@@ -13,3 +13,4 @@
docker-compose.yml
docker-compose.*.yml
Dockerfile
uwsgi.ini
......@@ -40,3 +40,6 @@ node_modules/
venv
dump.rdb
uwsgi.ini
......@@ -135,7 +135,7 @@ deploy_staging:
- echo "$CA" > $DOCKER_CERT_PATH/ca.pem
- echo "$CLIENT_CERT" > $DOCKER_CERT_PATH/cert.pem
- echo "$CLIENT_KEY" > $DOCKER_CERT_PATH/key.pem
- docker build --compress -t openpolis/sources-verification:latest .
- docker build --compress -t openpolis/opsv:latest .
- docker-compose down
- docker-compose up -d --build --force-recreate
- docker exec opsv_web python manage.py collectstatic --noinput
......
FROM python:3.6-slim
# update, upgrade and install useful tools and aliases
RUN apt-get -y update \
RUN apt-get -y update && apt-get install -y procps \
&& apt-get install -y --no-install-recommends apt-utils \
&& apt-get -y upgrade \
&& apt-get install -y --no-install-recommends git-core tmux vim locales\
......
......@@ -198,8 +198,7 @@ LOCAL_APPS = (
"constance.backends.database",
# task management
"taskmanager",
"django_uwsgi",
# "django_uwsgi",
)
# See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
......@@ -291,13 +290,18 @@ CONSTANCE_CONFIG = {
'SMTP_PASSWORD': (env("EMAIL_HOST_PASS", default=""), "Password for the SMTP host"),
'EMAIL_SUBJECT_PREFIX': (env("EMAIL_SUBJECT_PREFIX", default="[servizio verificafonti] "), "Email subject prefix"),
'EMAIL_FROM': (env("DEFAULT_FROM_EMAIL", default="noreply@openpolis.it"), "From email address for notifications"),
'REQUESTS_MAX_TIMEOUT': (env("RQEUSTS_MAX_TIMEOUT", default=10), "Max timeout for requests in seconds", int),
'REQUESTS_MAX_TIMEOUT': (env("REQUESTS_MAX_TIMEOUT", default=10), "Max timeout for requests in seconds", int),
'REQUESTS_UA': (env("REQUESTS_UA", default=""), "User agent in requests"),
}
CONSTANCE_IGNORE_ADMIN_VERSION_CHECK = True
CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'
CONSTANCE_BACKEND = 'constance.backends.redisd.RedisBackend'
CONSTANCE_REDIS_CONNECTION = {
'host': env("REDIS_HOST", default="localhost"),
'port': 6379,
'db': 0,
}
# END CONSTANCE (LIVE SETTINGS) CONFIGURATION
# TASK_MANAGER CONFIGURATION
......
......@@ -10,8 +10,13 @@ services:
- "8000"
links:
- postgres:postgres
- redis:redis
depends_on:
- postgres
- redis
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASS}@postgres/${POSTGRES_DB}
- REDIS_HOST=redis
- DEBUG=${DEBUG}
- DEBUG_TOOLBAR_INTERNAL_IPS=${DEBUG_TOOLBAR_INTERNAL_IPS}
- DJANGO_LOG_LEVEL=INFO
......@@ -46,6 +51,8 @@ services:
- public:/app/public
links:
- web:web
depends_on:
- web
postgres:
restart: always
......@@ -60,11 +67,22 @@ services:
expose:
- "5432"
redis:
container_name: opsv_redis
restart: always
image: redis:latest
volumes:
- redis_data:/data
expose:
- "6379"
volumes:
public:
name: opsv_public
pg_data:
name: opsv_pg_data
redis_data:
name: opsv_redis_data
weblogs:
name: opsv_weblogs
......
......@@ -12,13 +12,14 @@ django-object-actions
django-admin-row-actions
# live settings
django-constance[database]
django-constance[redis]
django-picklefield
# slack notifications
slackclient==2.0.0
# App requirements
psycopg2-binary==2.7.5
psycopg2-binary==2.8.3
# django-uwsgi-taskmanager
-e git+https://gitlab.depp.it/openpolis/op-task-manager-project.git@master#egg=django-uwsgi-taskmanager
......@@ -31,4 +32,4 @@ lxml
ipython==7.0.1
selenium
coverage
\ No newline at end of file
coverage