Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running FlowFuse from Synology NAS using Container Manager #174

Closed
azrin1972 opened this issue Nov 26, 2024 · 14 comments
Closed

Running FlowFuse from Synology NAS using Container Manager #174

azrin1972 opened this issue Nov 26, 2024 · 14 comments
Labels
needs-triage Needs looking at to decide what to do

Comments

@azrin1972
Copy link

Current Behavior

I've pulled a docker image "flowfuse/forge-docker" from docker repository

image

Then I configure the ports, volume and the environment as below

image

When I Start the container, it immediately stops and this is the log it generates

image

Alternatively, I've tried to follow the manual installation as described in the Installation guide:

download the 2 files:

curl -o docker-compose.yml https://raw.githubusercontent.com/FlowFuse/docker-compose/refs/heads/main/docker-compose.yml
curl -o .env https://raw.githubusercontent.com/FlowFuse/docker-compose/refs/heads/main/.env.example

I edited the .env file and set the DOMAIN to my registered domain as per my DNS server provider, wildcard has also been enabled in the DNS server.

then executing

docker compose -p flowfuse up -d

gives me

Please advise
configs.postgres_db_setup Additional property content is not allowed

Expected Behavior

No response

Steps To Reproduce

No response

Environment

No response

Linked Customers

No response

@azrin1972 azrin1972 added the needs-triage Needs looking at to decide what to do label Nov 26, 2024
@azrin1972 azrin1972 changed the title Running FlowFuse form Synology NAS using Container Manager Running FlowFuse from Synology NAS using Container Manager Nov 26, 2024
@hardillb
Copy link
Contributor

The first approach will not work, you can not just import the containers and start them, as the docker-compose.yml file is needed to populate the configuration file, based on the environment variables, that is then mounted into the container at the right location. The env vars are not directly mounted into the container.

The manual approach should work, I will have a look to see if I can work out what is happening.

@hardillb
Copy link
Contributor

hardillb commented Nov 26, 2024

For the manual approach please add a DB_USER and DB_PASSWORD value to the .env file and try again

EDIT: Actually that shouldn't be case.

Please run docker compose version

@azrin1972
Copy link
Author

For the manual approach please add a DBUSER and DBPASSWORD value to the .env file and try again

After adding DBUSER and DBPASSWORD value, now I got this error:
configs.nginx_stream Additional property content is not allowed

@azrin1972
Copy link
Author

For the manual approach please add a DB_USER and DB_PASSWORD value to the .env file and try again

EDIT: Actually that shouldn't be case.

Please run docker compose version

Docker Compose version v2.9.0-6413-g38f6acd

@hardillb
Copy link
Contributor

the configs.nginx_stream should all be commented out, and even if it wasn't the only substitution is for the DOMAIN env var.

My gut feel is this is going to be to do with the version of Docker compose available on Synology, but I don't have one to test on.

@azrin1972
Copy link
Author

I made a mistake, I've set the TLS_ENABLED to "true", but after setting the value back to "", running
docker-compose -p flowfuse up -d
gives me this
configs.nginx Additional property content is not allowed

@hardillb
Copy link
Contributor

again, this is confusing as configs.nginx doesn't do any variable substitution, so shouldn't be using properties.

I've just done a fresh local pull and install on debian 11 with docker compose v2.29.7 and it starts with just DOMAIN set.

This is making me think it's the docker compose version on the NAS even more.

@ppawlowski
Copy link
Contributor

@azrin1972, the content property of the config field was introduced in Docker Compose v2.23.1. Please update the Docker Compose version on your Synology NAS to use our compose file to create the FlowFuse stack.

@azrin1972
Copy link
Author

Thanks @hardillb

I'll send a ticket to Synology too for them to check.

I'll keep this issue open for the time being

@azrin1972
Copy link
Author

@azrin1972, the content property of the config field was introduced in Docker Compose v2.23.1. Please update the Docker Compose version on your Synology NAS to use our compose file to create the FlowFuse stack.

Ok I will try to update the version and update the result

Thanks @ppawlowski

@azrin1972
Copy link
Author

@ppawlowski got it working after updating to v2.30.2

Thanks @hardillb & @ppawlowski for helping me out

@azrin1972
Copy link
Author

azrin1972 commented Nov 28, 2024

I have a another question

How do I use an external emqx instead?

The reason I'm asking is because the I got an error
Bind for 0.0.0.0:1883 failed: port is already allocated

@azrin1972 azrin1972 reopened this Nov 28, 2024
@hardillb
Copy link
Contributor

There is currently no way to use an existing emqx install, the authentication integration is too deep.

You can change the port that the broker service binds to so it doesn't clash, e.g. the following would bind the broker to port 1893 rather than 1883

...
  broker:
    image: emqx/emqx:5.8.0
    networks:
      - flowforge
    ports:
      - 1893:1883
    healthcheck:
      test: ["CMD", "/opt/emqx/bin/emqx", "ctl", "status"]
      interval: 5s
      timeout: 25s
      retries: 5
    environment:
      - "VIRTUAL_HOST=broker.${DOMAIN:?error},mqtt.${DOMAIN:?error}"
      - "VIRTUAL_PORT=8083"
      - "LETSENCRYPT_HOST=broker.${DOMAIN:?error},mqtt.${DOMAIN:?error}"
      - "EMQX_DASHBOARD__DEFAULT_PASSWORD=topSecret"
    configs:
      - source: emqx
        target: /opt/emqx/data/configs/cluster.hocon
      - source: emqx-api
        target: /mounted/config/api-keys
    volumes:
      - emqx:/opt/emqx/data
...

@azrin1972
Copy link
Author

There is currently no way to use an existing emqx install, the authentication integration is too deep.

You can change the port that the broker service binds to so it doesn't clash, e.g. the following would bind the broker to port 1893 rather than 1883

...
  broker:
    image: emqx/emqx:5.8.0
    networks:
      - flowforge
    ports:
      - 1893:1883
    healthcheck:
      test: ["CMD", "/opt/emqx/bin/emqx", "ctl", "status"]
      interval: 5s
      timeout: 25s
      retries: 5
    environment:
      - "VIRTUAL_HOST=broker.${DOMAIN:?error},mqtt.${DOMAIN:?error}"
      - "VIRTUAL_PORT=8083"
      - "LETSENCRYPT_HOST=broker.${DOMAIN:?error},mqtt.${DOMAIN:?error}"
      - "EMQX_DASHBOARD__DEFAULT_PASSWORD=topSecret"
    configs:
      - source: emqx
        target: /opt/emqx/data/configs/cluster.hocon
      - source: emqx-api
        target: /mounted/config/api-keys
    volumes:
      - emqx:/opt/emqx/data
...

Thank you @hardillb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Needs looking at to decide what to do
Projects
Status: Closed / Done
Development

No branches or pull requests

3 participants