version: "3.7" services: monica: image: monica depends_on: - monica-db ports: - ${APP_PORT}:80 environment: - APP_KEY=f38f25083b2e64e2a673ade27d682359 - DB_HOST=monica-db - DB_USERNAME=usermonica - DB_PASSWORD=${MONICA_DB_PASS} volumes: - ${APP_DATA_DIR}/data:/var/www/html/storage restart: unless-stopped networks: - tipi_main_network labels: traefik.enable: ${APP_EXPOSED} traefik.http.routers.monica.rule: Host(`${APP_DOMAIN}`) traefik.http.routers.monica.entrypoints: websecure traefik.http.routers.monica.service: monica traefik.http.routers.monica.tls.certresolver: myresolver traefik.http.services.monica.loadbalancer.server.port: 80 monica-db: image: mysql:5.7 environment: - TZ=${TZ} - MYSQL_RANDOM_ROOT_PASSWORD=true - MYSQL_DATABASE=monica - MYSQL_USER=usermonica - MYSQL_PASSWORD=${MONICA_DB_PASS} volumes: - ${APP_DATA_DIR}/mysql:/var/lib/mysql restart: unless-stopped networks: - tipi_main_network