version: "3.9"

services:
  declaraciones:
    build: .
    container_name: declaraciones_django
    restart: always
    env_file:
      - .env
    depends_on:
      - db
      - redis
    working_dir: /code
    volumes:
      - .:/code
      - /home/gobiernodeocotla/sideclara.gobiernodeocotlan.gob.mx/SiDECLARAv001_240221/proyecto/declaraciones/media:/code/declaraciones/media
    ports:
      - "8000:8000"
    command: uwsgi --ini /code/declaraciones/uwsgi.ini

  db:
    image: mariadb:10.6.4
    container_name: declaraciones_db
    restart: always
    env_file:
      - .env
    volumes:
      - ./db/declaraciones/data:/var/lib/mysql

  redis:
    image: redis:alpine
    container_name: declaraciones_cache
    restart: always

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: declaraciones_phpmyadmin
    restart: always
    ports:
      - "8080:80"
    depends_on:
      - db

