diff --git a/app/eleicoes/eleicao/settings.py b/app/eleicoes/eleicao/settings/base.py similarity index 100% rename from app/eleicoes/eleicao/settings.py rename to app/eleicoes/eleicao/settings/base.py diff --git a/app/eleicoes/votepeloclima/settings/__ini__.py b/app/eleicoes/votepeloclima/settings/__ini__.py new file mode 100644 index 00000000..773cfc46 --- /dev/null +++ b/app/eleicoes/votepeloclima/settings/__ini__.py @@ -0,0 +1 @@ +from .base import * \ No newline at end of file diff --git a/app/eleicoes/votepeloclima/settings.py b/app/eleicoes/votepeloclima/settings/base.py similarity index 100% rename from app/eleicoes/votepeloclima/settings.py rename to app/eleicoes/votepeloclima/settings/base.py diff --git a/app/org_nossas/nossas/settings/__init__.py b/app/org_nossas/nossas/settings/__init__.py new file mode 100644 index 00000000..773cfc46 --- /dev/null +++ b/app/org_nossas/nossas/settings/__init__.py @@ -0,0 +1 @@ +from .base import * \ No newline at end of file diff --git a/app/org_nossas/nossas/settings.py b/app/org_nossas/nossas/settings/base.py similarity index 100% rename from app/org_nossas/nossas/settings.py rename to app/org_nossas/nossas/settings/base.py diff --git a/app/org_nossas/nossas/settings_prod.py b/app/org_nossas/nossas/settings/production.py similarity index 97% rename from app/org_nossas/nossas/settings_prod.py rename to app/org_nossas/nossas/settings/production.py index 272dcea2..7e938ab8 100644 --- a/app/org_nossas/nossas/settings_prod.py +++ b/app/org_nossas/nossas/settings/production.py @@ -1,4 +1,4 @@ -from .settings import * +from .base import * MIDDLEWARE = ( diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index 89170b16..19eba028 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -26,12 +26,41 @@ services: - traefik.http.routers.cms.tls.certresolver=myresolver - traefik.http.routers.cms.rule=${TRAEFIK_ROUTERS_RULE:-"HostRegexp(`cms.staging.bonde.org`)"} + eleicaodoano: + image: ${ELEICAO_DO_ANO_DOCKER_IMAGE:-nossas/cms:latest} + restart: "${DOCKER_RESTART_POLICY:-unless-stopped}" + pull_policy: always + environment: + - DJANGO_SETTINGS_MODULE=eleicoes.eleicao.settings.base + - DEBUG=${DEBUG:-True} + - ALLOWED_HOSTS=${ALLOWED_HOSTS:-"docker.localhost"} + - CMS_DATABASE_URL=${CMS_DATABASE_URL} + - BONDE_DATABASE_URL=${BONDE_DATABASE_URL} + - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} + - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} + - AWS_STORAGE_BUCKET_NAME=${AWS_STORAGE_BUCKET_NAME} + - RECAPTCHA_PUBLIC_KEY=${RECAPTCHA_PUBLIC_KEY} + - RECAPTCHA_PRIVATE_KEY=${RECAPTCHA_PRIVATE_KEY} + - DISABLE_RECAPTCHA=${DISABLE_RECAPTCHA} + - BONDE_ACTION_API_URL=${BONDE_ACTION_API_URL} + - BONDE_ACTION_SECRET_KEY=${BONDE_ACTION_SECRET_KEY} + - ETCD_HOST=${ETCD_HOST:-"etcd"} + - ETCD_PORT=${ETCD_PORT:-2379} + labels: + - traefik.enable=true + - traefik.http.routers.cms.priority=10 + - traefik.http.services.cms.loadbalancer.server.port=8000 + - traefik.http.routers.cms.tls=true + - traefik.http.routers.cms.tls.certresolver=myresolver + - traefik.http.routers.cms.rule=${TRAEFIK_ROUTERS_RULE:-"HostRegexp(`cms.staging.bonde.org`)"} + + nossas: image: ${NOSSAS_DOCKER_IMAGE:-nossas/cms:latest} restart: "${DOCKER_RESTART_POLICY:-unless-stopped}" pull_policy: always environment: - - DJANGO_SETTINGS_MODULE=nossas.settings_prod + - DJANGO_SETTINGS_MODULE=nossas.settings.production - DEBUG=${DEBUG:-True} - ALLOWED_HOSTS=${ALLOWED_HOSTS:-"docker.localhost"} - CMS_DATABASE_URL=${NOSSAS_DATABASE_URL}