[Bug]: all-in-one docker compose fails to install on portainer.
Opened this issue · 1 comments
dfear commented
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Trying to install lowcoder in portainer (url: docker/stacks/newstack) using either the "web editor" or the "upload" options results in the following error:
Deployment error
Failed to deploy a stack: failed to resolve services environment: env file /data/compose/4/default.env not found: stat /data/compose/4/default.env: no such file or directory
Expected Behavior
lowcoder to be deployed in portainer.
Steps to reproduce
in portainer:
- select the desired docker environment
- In the left hand menu, click "stacks".
- click "add stack" button.
- Enter a "Name".
- Under "Build method" select "web editor" or "upload".
a) select "web editor" - paste the contents of "https://github.com/lowcoder-org/lowcoder/blob/main/deploy/docker/docker-compose.yaml"
b) select "upload" - download the yaml file from: https://github.com/lowcoder-org/lowcoder/blob/main/deploy/docker/docker-compose.yaml to your PC.
a) Click "select file", then select the downloaded yaml file. - click the " deploy this stack".
Environment
No response
Additional Information
No response
ludomikula commented
To deploy in portainer use these steps (tested in portainer 2.21.5):
- Follow your original steps 1 - 4
- Use build method "Web editor" (just because it's easier to edit in place)
- Place this updated compose file:
services:
##
## Start Lowcoder (all-in-one)
##
lowcoder-all-in-one:
image: lowcoderorg/lowcoder-ce:latest
container_name: lowcoder
env_file:
- path: ./stack.env
required: true
- path: ./override.env
required: false
ports:
- "3000:3000"
- "3443:3443"
volumes:
- lowcoder-stacks:/lowcoder-stacks
- lowcoder-assets:/lowcoder/assets
restart: unless-stopped
volumes:
lowcoder-stacks:
lowcoder-assets:
- Download default.env file from git
- Click [Load variables from .env file] and select the downloaded file
- Click [Deploy stack]
Changes in the docker compose file:
- On line 19 renamed default.env to stack.env because portainer expects that filename
- Added volumes section at the end of the compose file to define volumes
- Updated volume mounts to use the volumes
When you now navigate to Volumes in portainer, you will see 2 volumes created.