alterações gerais
This commit is contained in:
@ -1,25 +1,31 @@
|
||||
version: '3.8'
|
||||
|
||||
volumes:
|
||||
production_postgres_data: {}
|
||||
production_postgres_data_backups: {}
|
||||
production_traefik: {}
|
||||
production_esdata: {}
|
||||
production_django_static: {}
|
||||
production_django_media: {}
|
||||
|
||||
|
||||
services:
|
||||
django:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./compose/production/django/Dockerfile
|
||||
|
||||
image: diarios_oficiais_alems_production_django
|
||||
volumes:
|
||||
- production_django_media:/app/diarios_oficiais_alems/media
|
||||
container_name: diarios_oficiais_alems_production_django
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
- elasticsearch
|
||||
volumes:
|
||||
- production_django_media:/app/diarios_oficiais_alems/media
|
||||
- production_django_static:/app/diarios_oficiais_alems/static
|
||||
env_file:
|
||||
- ./.envs/.production/.django
|
||||
- ./.envs/.production/.postgres
|
||||
ports:
|
||||
- '8005:8005'
|
||||
command: /start
|
||||
|
||||
postgres:
|
||||
@ -27,34 +33,53 @@ services:
|
||||
context: .
|
||||
dockerfile: ./compose/production/postgres/Dockerfile
|
||||
image: diarios_oficiais_alems_production_postgres
|
||||
container_name: diarios_oficiais_alems_production_postgres
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- production_postgres_data:/var/lib/postgresql/data
|
||||
- production_postgres_data_backups:/backups
|
||||
env_file:
|
||||
- ./.envs/.production/.postgres
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U debug"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
traefik:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./compose/production/traefik/Dockerfile
|
||||
image: diarios_oficiais_alems_production_traefik
|
||||
depends_on:
|
||||
- django
|
||||
volumes:
|
||||
- production_traefik:/etc/traefik/acme
|
||||
ports:
|
||||
- '0.0.0.0:80:80'
|
||||
- '0.0.0.0:443:443'
|
||||
|
||||
redis:
|
||||
image: docker.io/redis:6
|
||||
|
||||
nginx:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./compose/production/nginx/Dockerfile
|
||||
image: diarios_oficiais_alems_production_nginx
|
||||
elasticsearch:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.3
|
||||
container_name: diarios_oficiais_alems_production_elasticsearch
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- discovery.type=single-node
|
||||
- xpack.security.enabled=true
|
||||
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
|
||||
- bootstrap.memory_lock=true
|
||||
volumes:
|
||||
- production_esdata:/usr/share/elasticsearch/data
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
|
||||
|
||||
frontend:
|
||||
image: nginx:alpine
|
||||
container_name: diarios_oficiais_alems_production_frontend
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- django
|
||||
volumes:
|
||||
- production_django_static:/usr/share/nginx/static:ro
|
||||
- production_django_media:/usr/share/nginx/media:ro
|
||||
- ./compose/production/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user