#ERROR The Compose file docker compose

1 messages ยท Page 1 of 1 (latest)

viral falcon
#

You need to share what you did if you expect us to be able to help you

autumn sinew
#

ok

#

i am using portrainer

#

let me get the yaml file

#

version: '3.0'

services:
portainer:
container_name: portainer
image: portainer/portainer-ce
restart: always
ports:
- "9000:9000/tcp"
environment:
- TZ=Europe/London
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/portainer:/data
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /opt/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
privileged: true
network_mode: host

tender crowBOT
#

To format your text as code, enter three backticks on the first line, press Shift+Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

viral falcon
#

There's no way to know what that unformatted mess is

autumn sinew
#

ah

#

uhhh

#

services:
  portainer:
    container_name: portainer
    image: portainer/portainer-ce
    restart: always
    ports:
      - "9000:9000/tcp"
    environment:
      - TZ=Europe/London
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /opt/portainer:/data
homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /opt/homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host```
#

is that good?

viral falcon
#

Your indenting is broken

autumn sinew
#

huh

viral falcon
#

homeassistant needs to be at the same level as portainer

tender crowBOT
#

YAML is the mark up language used by Home Assistant, consistent indenting (two spaces per level) is key. Here is a primer, and this explains multi-line templates. For validating YAML see YAML Lint.

viral falcon
#

YAML is YAML... indenting is critical

autumn sinew
#

ohhh

#

im a bit confused

viral falcon
#
version: '3.0'

services:
  portainer:
    container_name: portainer
    image: portainer/portainer-ce
    restart: always
    ports:
      - "9000:9000/tcp"
    environment:
      - TZ=Europe/London
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /opt/portainer:/data
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /opt/homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host
autumn sinew
#

seems to of worked

#

cheers ๐Ÿ‘

viral falcon
#

You'll learn a lot about YAML, and how fussy it is ๐Ÿ˜‰

autumn sinew
#

ye im very new to linux right now im testing on a vm i got a thin client coming thursday

viral falcon
#

Next ... backups ๐Ÿ˜‰

autumn sinew
#

hmm

viral falcon
autumn sinew
#

my portrainer just stopped working

#

fuck

#

i ran out of storage on the vm