version: "3.3"
    
services:

  docksible_redmine:
    image: redmine
    container_name: docksible_redmine
    restart: always
    environment:
      REDMINE_DB_MYSQL: docksible_db
      REDMINE_DB_PASSWORD: "{{ database_root_password }}"
    security_opt:
      - seccomp:unconfined

  docksible_db:
    image: mysql:8.3
    container_name: docksible_db
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: "{{ database_root_password }}"
      MYSQL_DATABASE: redmine
    volumes:
      - "$HOME/docksible-volumes/db_data:/var/lib/mysql"

  docksible_webserver:
    image: nginx:latest
    container_name: docksible_webserver
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "$HOME/docksible-volumes/nginx_data:/etc/nginx/conf.d"
      # TODO: This "WordPress volume" is needed for Certbot?
      - "$HOME/docksible-volumes/wordpress_data:/var/www/html"

  docksible_phpmyadmin:
    depends_on:
      - docksible_db
    image: phpmyadmin
    container_name: docksible_phpmyadmin
    restart: unless-stopped
    environment:
      - "PMA_HOST=docksible_db"

  docksible_ssh-proxy:
    build: "$HOME/ssh-proxy"
    ports:
            - "2222:22"
    volumes:
            - "$HOME/docksible-volumes/ssh-proxy_data:/home/proxy_user/.ssh"
    restart: always
    container_name: docksible_ssh-proxy
