services:
  shlink-server:
    container_name: shlink-server
    image: shlinkio/shlink:stable
    environment:
      - TZ=${TZ}
      - DEFAULT_DOMAIN=aknlw.com
      - IS_HTTPS_ENABLED=true
      - GEOLITE_LICENSE_KEY=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
      - DB_DRIVER=maria
      - DB_USER=shlink
      - DB_NAME=shlink
      - DB_PASSWORD=OoDahdohv6
      - DB_HOST=shlink-database
      - INITIAL_API_KEY=f0dc4f0c-6d4e-47a3-ad65-d39acca81435
    depends_on:
      - shlink-database
    networks:
      - shlink
      - reverse-proxy
    ports:
      - 8380:8080
    restart: always

  shlink-database:
    container_name: shlink-database
    image: mariadb:10.8
    environment:
      - MARIADB_ROOT_PASSWORD=coo6Pooch2
      - MARIADB_DATABASE=shlink
      - MARIADB_USER=shlink
      - MARIADB_PASSWORD=OoDahdohv6
    networks:
      - shlink
    restart: always
    volumes:
      - ${DOCKER_CONFIGS}/mariadb/db_data:/var/lib/mysql

  shlink-web-client:
    container_name: shlink-web-client
    image: shlinkio/shlink-web-client:3.1.0
    ports:
      - 8381:80
    networks:
      - shlink
      - reverse-proxy
    restart: always
    volumes:
      - ${DOCKER_CONFIGS}/servers.json:/usr/share/nginx/html/servers.json

networks:
  shlink:
    name: shlink
  reverse-proxy:
    name: reverse-proxy
    external: true
