version: '3'
services:
  nginx:
    image: 'jc21/nginx-proxy-manager:latest'
    container_name: {{ name_docker }}
    hostname: {{ name_docker }}
    restart: always
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      DB_MYSQL_HOST: "nginx-db"
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: "bxlife"
      DB_MYSQL_PASSWORD: "dKGLhPrlaYOWAOZ0"
      DB_MYSQL_NAME: "nginx"
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - nginx-db
  nginx-db:
        image: mariadb:latest
        container_name: nginx-db
        environment:
        - PUID=1000
        - PGID=1000
        - MYSQL_ROOT_PASSWORD=xv4gv5k8qGXlrUUl
        - TZ={{s_tz}}
        - MYSQL_DATABASE=nginx
        - MYSQL_USER=bxlife
        - MYSQL_PASSWORD=dKGLhPrlaYOWAOZ0
        volumes:
        - ./config/mysql:/var/lib/mysql
        restart: unless-stopped