# doc : https://docs.docker.com/compose/compose-file/compose-versioning/
# version : https://docs.docker.com/compose/compose-file/compose-versioning/
# version to download : https://github.com/docker/compose/releases/
# had to remove the apt version because it was not up to date (sudo apt remove docker-compose)
# then install as recommended :  curl -SL https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-linux-x86_64            -o /usr/local/bin/docker-compose
# or (neat) :                             https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

version: "3.8"

services:
# ---------------------------------
  nginx:
    #restart: on-failure
    ports:
      - "443:443"
    build:
      context: ./requirements/nginx
      dockerfile: Dockerfile
    image: nginx
    container_name: mynginx
# ---------------------------------
#  mariadb:
#    #restart: on-failure
#    networks:
#      - inception-network
#    env_file: .env
#    build:
#      context: ./requirements/mariadb
#      args:
#        - DB_NAME=${DB_NAME}
#        - DB_USER=${DB_USER}
#        - DB_PSWD=${DB_PSWD}
#    image: mariadb
#    container_name: mymariadb
# ---------------------------------
#  wordpress:
#    #restart: on-failure
#    networks:
#      - inception-network
#    env_file: .env
#    build:
#      context: ./requirements/wordpress
#      args:
#        - WP_DIR=${WP_DIR}
##    depends_on:
##      mariadb:
##        condition: service_completed_successfully
#    image: wordpress
#    container_name: mywordpress

networks:
  inception-network:
    driver: bridge

