version: "3.2"

services:
  database:
    container_name: chevereto-free_database
    image: mariadb:focal
    networks:
      - chevereto
    volumes:
      - database:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: chevereto
      MYSQL_USER: chevereto
      MYSQL_PASSWORD: user_database_password

  app:
    container_name: chevereto-free_app
    image: ghcr.io/rodber/chevereto-free-httpd-php:1.6
    networks:
      - chevereto
    volumes:
      - storage:/var/www/html/images/
      - content:/var/www/html/content/
    ports:
      - 8810:80
    restart: always
    environment:
      CHEVERETO_TAG: "free"
      CHEVERETO_DB_HOST: database
      CHEVERETO_DB_USER: chevereto
      CHEVERETO_DB_PASS: user_database_password
      CHEVERETO_DB_PORT: 3306
      CHEVERETO_DB_NAME: chevereto
      CHEVERETO_HTTPS: 0

volumes:
  database:
  content:
  storage:
  app:

networks:
  chevereto: