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

not working in docker compose mode #14

Open
Eucliddd opened this issue Dec 13, 2022 · 1 comment
Open

not working in docker compose mode #14

Eucliddd opened this issue Dec 13, 2022 · 1 comment

Comments

@Eucliddd
Copy link

My container is created by docker compose up -d, and i have add labels into docker-compose.yml as follows:

version: "2.3"
services:
  emby:
    image: lovechen/embyserver:latest
    container_name: emby
    network_mode: host
    environment:
      - UID=1000 # The UID to run emby as (default: 2)
      - GID=1000 # The GID to run emby as (default 2)
      - GIDLIST=1000 # A comma-separated list of additional GIDs to run emby as (default: 2)
    volumes:
      - /root/docker/emby/config:/config
      - /root/media/rclone/myAlist:/movie
    deploy:
      labels:
        com.docker-tc.enabled: 1
        com.docker-tc.limit: 100mbps
    restart: unless-stopped

The container id is 356c6968c23e.
However, it does not work, and the log is as follows:

2022/12/13 09:29:32 Thanks for using hapttic v1.0.0
2022/12/13 09:29:32 Listening on 127.0.0.1:4080
2022/12/13 09:29:32 Forwarding requests to /docker-tc/bin/httpd.sh
2022/12/13 09:29:32 Logging errors to stderr
[2022-12-13T09:29:33+00:00] [07aa0054ceab] Notice: Skipping container, no valid labels found
[2022-12-13T09:29:33+00:00] [18758b8daca1] Notice: Skipping container, service was disabled by label
[2022-12-13T09:29:34+00:00] [9f60ccdfcf86] Notice: Skipping container, no valid labels found
[2022-12-13T09:29:34+00:00] [a7981804c7ad] Notice: Skipping container, no valid labels found
[2022-12-13T09:30:29+00:00] [85be2c3272d4] Notice: Skipping container, no valid labels found
[2022-12-13T09:30:38+00:00] [1f9db4f5eb18] Notice: Skipping container, no valid labels found
[2022-12-13T09:30:43+00:00] [f6ae6c0fe610] Notice: Skipping container, no valid labels found
[2022-12-13T09:42:55+00:00] [6a3a1e5a96fe] Notice: Skipping container, no valid labels found
2022/12/13 09:45:25 Executing /docker-tc/bin/httpd.sh
2022/12/13 09:45:40 Executing /docker-tc/bin/httpd.sh
[2022-12-13T09:56:42+00:00] [356c6968c23e] Notice: Skipping container, no valid labels found
@mohrezaee
Copy link

mohrezaee commented Dec 17, 2022

In my case, writing labels under the main block (and not under deploy) works fine:

version: "2.3"
services:
  emby:
    image: lovechen/embyserver:latest
    container_name: emby
    network_mode: host
    environment:
      - UID=1000 # The UID to run emby as (default: 2)
      - GID=1000 # The GID to run emby as (default 2)
      - GIDLIST=1000 # A comma-separated list of additional GIDs to run emby as (default: 2)
    volumes:
      - /root/docker/emby/config:/config
      - /root/media/rclone/myAlist:/movie
    labels:
      - "com.docker-tc.enabled=1"
      - "com.docker-tc.limit=100mbps"
        
    restart: unless-stopped

This should gives you the logs you want. But still no effect on download or upload bandwidth.

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

No branches or pull requests

2 participants