version: '3' volumes: db: data: services: db: image: mariadb restart: always volumes: - db:/var/lib/mysql environment: MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_RANDOM_ROOT_PASSWORD: '1' MYSQL_PASSWORD: wordpress wordpress: build: . volumes: - data:/app/wordpress/wp-content/ restart: always nginx: build: ./nginx/ ports: - 8180:443 volumes: - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro volumes_from: - wordpress restart: always