LinkStackOrg / linkstack-docker

A simple to set up docker variant of LinkStack. LinkStack is a highly customizable link sharing platform with an intuitive, easy to use user interface.
https://linkstack.org/docker
GNU Affero General Public License v3.0
349 stars 43 forks source link

empty htdocs after using docker-compose #66

Closed C-Fu closed 1 year ago

C-Fu commented 1 year ago
version: "3.8"

services:

  linkstack:
    hostname: 'linkstack'
    image: 'linkstackorg/linkstack:latest'
    container_name: linkstack
    environment:
      TZ: 'Asia/Kuala_Lumpur'
      SERVER_ADMIN: 'email'
#      HTTP_SERVER_NAME: 'url'
      HTTPS_SERVER_NAME: 'url'
      LOG_LEVEL: 'info'
      PHP_MEMORY_LIMIT: '256M'
      UPLOAD_MAX_FILESIZE: '8M'
    volumes:
      - './linkstack_data:/htdocs'
    ports:
      - '8188:80'
      - '8190:443'
    restart: unless-stopped

So if I run docker-compose.yml and look at the logs

Attaching to linkstack
linkstack    | cat: can't open '/htdocs/version.json': No such file or directory
linkstack    | + ------------------------------------------------------------------ +
linkstack    | |                      LINKSTACK v                           |
linkstack    | + ------------------------------------------------------------------ +
linkstack    | | Updating Configuration: Apache Base (/etc/apache2/httpd.conf)      |
linkstack    | | Updating Configuration: Apache SSL  (/etc/apache2/conf.d/ssl.conf) |
linkstack    | | Updating Configuration: PHP         (/etc/php81/php.ini)            |
linkstack    | | Updating Configuration: Complete                                   |
linkstack    | | ------------------------------------------------------------------ |
linkstack    | | Running Apache                                                     |
linkstack    | + ------------------------------------------------------------------ +

the linkstack_data/htdocs folder is empty. Not really sure why.

lastsamurai26 commented 1 year ago

if you want to use a custom folder without the functionality of Docker you have to fill the mounted folder yourself

if you are using

version: '3'
services:
  llc:
    container_name: llc
    image: linkstackorg/linkstack
    environment:
      - HTTP_SERVER_NAME="graf.de" 
      - HTTPS_SERVER_NAME="graf.de"
      - SERVER_ADMIN="admin@example.xyz"
      - TZ="Europe/Berlin"
      - PHP_MEMORY_LIMIT="512M"
      - UPLOAD_MAX_FILESIZE="8M"
    restart: always
    volumes:
      - linkstack_data:/htdocs
volumes:
  linkstack_data:

it would be working :-)

otherwise download the newst version from https://github.com/linkstackorg/linkstack/releases/latest/download/linkstack.zip and expand this into your folder and restart the docker container

lastsamurai26 commented 1 year ago

inside of the docker we are using user id 100 and group id 101

C-Fu commented 1 year ago

inside of the docker we are using user id 100 and group id 101

Hi, I did everthing I should, including entering the container and did a

htdocs > chmod -R 100:101 .

but even when I did not do the above, I get this

image

what did I do wrong?

lastsamurai26 commented 1 year ago

change the .env search for FORCE_HTTPS=false (line 85) and set this to "true"

https://docs.linkstack.org/docker/reverse-proxies/