Hello,
I’m attempting to secure an Ubuntu 18.04 server for use with Traefik, Nextcloud and Let’s encrypt. I’ve decided to learn Docker to accomplish these things. With no practical experience, I’m turning to guides written by generous people online.
Anyway, I’m attempting to follow the “Setting up a VPS to self-host with Docker” in the How-To section of this site. I’ve followed the guide up until running docker-compose up -d to get Traefik running. Docker tells me “ERROR: In file ‘./docker-compose.yml’, service ‘volumes’ must be a mapping not an array.” Googling the error results in suggestions that the formatting may be incorrect. Here is the guide I’m attempting to use.
And here is the file specifically:
Blockquote
version: "3"
services:
#Traefik
traefik:
container_name: traefik
image: traefik:alpine
ports:
- 80:80
- 443:443
- 8080:8080
restart: unless_stopped
volumes:
- ./selfhosted/traefik:/etc/traefik
- /var/run/docker.sock:/var/run/docker.sock
Docker version: 19.03.8
Docker-compose version 1.17.1
If anyone can offer me some helpful advice, I’d appreciate it.