homer icon indicating copy to clipboard operation
homer copied to clipboard

No config.yml when deployed on portainer.

Open deez3134 opened this issue 2 years ago • 6 comments

Im new to this so how do i get the config.yml in assets

image

deez3134 avatar Jun 01 '22 02:06 deez3134

Thank you

Sent from my iPhone

On Jun 1, 2022, at 9:32 PM, wy580477 @.***> wrote:

 Run following command:

mv config.yml.dist config.yml

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

deez3134 avatar Jun 02 '22 23:06 deez3134

I have the same issue and the solution does not worked for me

Hussienfahmy avatar Jun 04 '22 02:06 Hussienfahmy

Hi there,

@deez3134 Config files should be automatically installed in your assets directory, IF you created the assets directory with the right permissions (same owner as the user runing the container).

Could you share your container run parameter, the container startup logs, and show the assets directory permissions (ls -la) ?

bastienwirtz avatar Jun 04 '22 07:06 bastienwirtz

Hi,

I had same issue, but I didn't deploy it with Portainer (although a Portainer Docker is running in the machine) but with docker-compose.

I copied the oficial docker-compose file and edited it a bit to make traefik work (labels, and add the same network as traefik):

---
version: "2"
services:
  homer:
    image: b4bz/homer
    #To build from source, comment previous line and uncomment below
    #build: .
    container_name: homer
    volumes:
      - './assets/:/www/assets'
    ports:
      - 8090:8080
    user: 1000:1000 # default
    environment:
      - INIT_ASSETS=1 # default
    networks:
      - pi
    restart: unless-stopped
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.homer.rule=Host(`mycustomurl`)'
      - 'traefik.http.services.homer.loadbalancer.server.port=8080'
networks:
  pi:
    external: true

mkdir assets with default user (1000:1000) and docker-compose up -d.

Installation goes without errors, no failure logs. When it starts, docker logs show

2022-06-05 20:09:19: (server.c.1568) server started (lighttpd/1.4.64)

And I can access both the webserver (on mycustomurl) and using docker exec -it homer sh, but the assets folder is empty.

draz1c avatar Jun 05 '22 20:06 draz1c

This work for me

version: "3"

############
# NETWORKS #
############

networks:
  traefik_proxy:
    external: true

############
# SERVICES #
############

services:

# APPLICATION #
#=============#

  homer:
    image: b4bz/homer:latest
    container_name: homer
    hostname: homer
    restart: unless-stopped
    user: ${PUID}:${PGID}
    networks:
      - traefik_proxy
    environment:
      - INIT_ASSETS=1
      - TZ=${TZ}
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${USERDIR}/docker/webserver/homer/public/assets:/www/assets
    healthcheck:
      test: ["CMD", "curl", "-f", "http://127.0.0.1:8080"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 1m
    labels:
      traefik.enable: true
      traefik.docker.network: traefik_proxy
      traefik.http.routers.homer.entrypoints: websecure
      traefik.http.routers.homer.rule: Host(`dev.${DOMAINNAME}`) 
      traefik.http.routers.homer.service: homer
      traefik.http.services.homer.loadbalancer.server.port: 8080
      com.centurylinklabs.watchtower.enable: true

Variables are in file .env ;) I don't see network entrypoint traefik.docker.network: pi in your labels.

SckyzO avatar Jun 22 '22 12:06 SckyzO

Hi there,

I never used traefik so I can't say much about that, but I added some additional info about the permission issues in the documentation.

OP (@deez3134) do you still experience the issue? have you adjusted the folder permission and user docker option correctly ? Can you show the container logs?

bastienwirtz avatar Jul 15 '22 21:07 bastienwirtz