version: '3' services: nginx: build: ./requirements/nginx hostname: djonker.42.fr init: true container_name: nginx restart: always volumes: - ~/data/wordpress:/var/www/wordpress ports: - 80:80 - 443:443 networks: wordpress: ipv4_address: 172.20.30.10 mariadb: build: ./requirements/mariadb environment: - WORDPRESSDATABASE=${WORDPRESSDATABASE} - WORDPRESSDATABASEUSER=${WORDPRESSDATABASEUSER} - WORDPRESSDATABASEPASSWD=${WORDPRESSDATABASEPASSWD} init: true container_name: mariadb restart: always volumes: - ~/data/mariadb/data:/var/lib/mysql - ~/data/mariadb/config:/etc/mysql/conf.d - ~/data/mariadb/logs:/var/log/mysql networks: wordpress: ipv4_address: 172.20.30.20 wordpress: build: ./requirements/wordpress container_name: wordpress restart: always volumes: - ~/data/wordpress:/var/www/wordpress networks: wordpress: ipv4_address: 172.20.30.30 networks: wordpress: external: true