Install second website on same server using Docker

@dockersupport I have to install multiple WordPress websites on one DigitalOcean Ubuntu VPS server using Docker, specifically using Docker Compose.

I’m totally new to Docker, and thus far this is what I’ve got in the docker-compose.yml file:

Note that I’m using an IP address in Virtual_Host, because I’m simply testing things out, and in the server I’ve configured three IP addresses, one for each website.

web: image: wordpress restart: always links: - mysql environment: - VIRTUAL_HOST= - WORDPRESS_DB_PASSWORD:password! - WORDPRESS_DB_NAME:db_site1 ports: - 80 volumes: - /wordpress/site1:/var/www/html mysql: image: mysql:5.7 restart: always ports: - 3306 environment: - MYSQL_ROOT_PASSWORD=password! phpmyadmin: image: phpmyadmin/phpmyadmin restart: always links: - mysql ports: - 8080:80 environment: MYSQL_USERNAME: root MYSQL_ROOT_PASSWORD: password! PMA_HOST: mysql nginx: image: jwilder/nginx-proxy restart: always ports: - 80:80 volumes: - /var/run/docker.sock:/tmp/docker.sock:ro

When I run this script, it installs WordPress, mysql, phpmyadmin, and “jwilder/nginx-proxy”, and the website works, but I can’t seem to figure out how to write the docker-compose.yml file or configure jwilder/nginx-proxy to install a second and third websites.

Any help will be appreciated.

I can’t say forjwilders/nginx-proxy, but there is a complete tutorial for traefik:

Maybe that’s something you want to use.