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

Anyone have a working docker compose file suitable for portainer? #680

Open
baldfox opened this issue Oct 7, 2022 · 9 comments
Open

Anyone have a working docker compose file suitable for portainer? #680

baldfox opened this issue Oct 7, 2022 · 9 comments

Comments

@baldfox
Copy link

baldfox commented Oct 7, 2022

Just looking for a general compose file to use as a "stack" in portainer.

What should we implement

Am currently running the following but it appears to be outdated/different image. I've been unable to modify it to pull the latest version of tasmoadmin 2.1:

version: '3.3'
services:
tasmoadmin:
image: raymondmm/tasmoadmin
container_name: TasmoAdmin
restart: unless-stopped
logging:
driver: json-file
network_mode: bridge
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- /docker/appdata/tasmoadmin:/data
- /etc/localtime:/etc/localtime:ro
ports:
- 5555:80

@baldfox
Copy link
Author

baldfox commented Oct 7, 2022

Just to add I've tried various versions with tasmoadmin/tasmoadmin as the image etc, but been unable to make it through deployment. I did see the docker-compose file on the main page, but wasn't able to incorporate it. Ideally looking for something that fits (as close to as possible) to the scheme above.

@inverse
Copy link
Collaborator

inverse commented Oct 7, 2022

We had to migrate away from Docker hub. Please use this:

docker pull ghcr.io/tasmoadmin/tasmoadmin:v2.1.0

It's hosted on GitHub

See: https://github.com/TasmoAdmin/TasmoAdmin/pkgs/container/tasmoadmin

@baldfox
Copy link
Author

baldfox commented Oct 7, 2022

@inverse Thank you for the quick response. So I managed to get deployment with your assistance above, using this stack:

version: '3.3'
services:
tasmoadmin:
image: ghcr.io/tasmoadmin/tasmoadmin:v2.1.0
container_name: newtasmo
restart: unless-stopped
logging:
driver: json-file
network_mode: bridge
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- /docker/appdata/newtasmoadmin:/data
- /etc/localtime:/etc/localtime:ro
ports:
- 6666:80

It deploys fully, but I have no access to the webpage, it times out. Error logs appear to show a successful startup. Anything glaringly obvious I am doing wrong here? (no port conflicts).

start up logs here: https://pastebin.com/j2yCz16Y

@inverse
Copy link
Collaborator

inverse commented Oct 7, 2022

I'm using this for development... seems pretty similar :/

version: "3.9"
services:
  web:
    build:
      context: .
      dockerfile: .docker/Dockerfile.alpine-tmpl
    ports:
      - "8000:80"
    environment:
      - TASMO_DATADIR=/data/tasmoadmin/
      - TASMO_DEBUG=1
    volumes:
      - ./tasmoadmin:/var/www/tasmoadmin
      - ./.storage:/data/tasmoadmin

@alexdelprete
Copy link

alexdelprete commented Oct 7, 2022

but I have no access to the webpage

are you accessing it through this url? http://docker:6666

My compose file:

version: '3'

services:
  tasmoadmin:
    image: ghcr.io/tasmoadmin/tasmoadmin:v2.1.0
    container_name: tasmoadmin
    hostname: tasmoadmin
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    volumes:
      - $PWD/data:/data
    ports:
      - 5556:80

@baldfox
Copy link
Author

baldfox commented Oct 9, 2022

@inverse I'll give that a go

but I have no access to the webpage

are you accessing it through this url? http://docker:6666

I was trying. I've been varying the ports. It's not a port issue, it just wasn't taking. I'll try with your compose, it looks a lot closer to what am used to. I'm clearly out of my comfort zone, and have never dealt with scripts/docker files before.

@alexdelprete
Copy link

alexdelprete commented Oct 9, 2022

The important thing you need to understand is this:

ports:
- 6666:80

You know what this means, right? It means that inside the container, tasmoadmin listens on port 80, but externally (on the docker host/lan side) it's available on port 6666.

So when you want to access tasmoadmin from the lan, you need to use the url: http://dockerhost:6666

If tasmoadmin log doesn't report any error, that url must surely work.

You can also check with netstat -tulpn and see if port 6666 is bound to docker-proxy (the process will formward the connections to port 80 inside the container). This is on my docker host:

❯ netstat -tulpn | grep 5556

tcp        0      0 0.0.0.0:5556            0.0.0.0:*               LISTEN      5490/docker-proxy

Let me know...

@netstx
Copy link

netstx commented Mar 4, 2023

Here is my docker-compose for the Portainer "stack". Keep in mind I am passing through a directory on the host for the volume.

version: "3"
services:
  tasmoadmin:
    image: ghcr.io/tasmoadmin/tasmoadmin:latest
    container_name: tasmoadmin
    hostname: tasmoadmin
    ports:
      - 8181:80
    restart: unless-stopped
    volumes:
      - /opt/containers/tasmoadmin/data:/data

This works well, had no issues so far.

@RMadosa
Copy link

RMadosa commented Aug 25, 2023

Lates version that works for me is 2.4.2.
Version 3.0.0: Go to state running at Portainer but no login page are available.

Version 3.0.x -> latest: Maybe I should have waited much longer, because I canceled the healthy status after 10 minutes.

My portainer stack looks similar to this one from "netstx", with a different port (8888:80) and version (v2.4.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants