version: '3' services: #change name of the service site_tld: #change the image you want to use image: mitlabs/apache-php7.3 #make this the same as the service name container_name: yourSite_tld restart: unless-stopped security_opt: - no-new-privileges:true networks: - proxy volumes: - /etc/localtime:/etc/localtime:ro - /var/run/docker.sock:/var/run/docker.sock:ro - ./www:/var/www/html environment: #change this crediantial depending on the service you are creating site_tld_DB_HOST: mysql_1 site_tld_DB_USER: root site_tld_DB_PASSWORD: makeYourOwnPassword site_tld_DB_NAME: site_tld_db labels: #using a word replace tool change all the “site_tld words in here with the service name you are creating” - "traefik.enable=true" - "traefik.http.routers.site_tld.entrypoints=http" - "traefik.http.routers.site_tld.rule=Host(`site.tld`)" - "traefik.http.middlewares.site_tld-https-redirect.redirectscheme.scheme=https" - "traefik.http.routers.site_tld.middlewares=site_tld-https-redirect" - "traefik.http.routers.site_tld-secure.entrypoints=https" - "traefik.http.routers.site_tld-secure.rule=Host(`site.tld`)" - "traefik.http.routers.site_tld-secure.tls=true" - "traefik.http.routers.site_tld-secure.tls.certresolver=http" - "traefik.http.routers.site_tld-secure.service=site_tld" - "traefik.http.services.site_tld.loadbalancer.server.port=80" - "traefik.docker.network=proxy" networks: proxy: external: true