pablouser1 / ProxiTok

Open source alternative frontend for TikTok made using PHP
https://github.com/pablouser1/ProxiTok/wiki/Public-instances
GNU Affero General Public License v3.0
1.85k stars 134 forks source link

No css and js files are served - rendering the web interface useless #155

Closed printfuck closed 1 year ago

printfuck commented 1 year ago

Describe the bug When setting up the docker-compose installation no css and js files are served. The css and js tags are served empty to the browser.

tiktog

To Reproduce

  1. clone
  2. run docker-compose up with app_url specified

Expected behavior The web interface should appear as usual.

Logs

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="apple-touch-icon" sizes="180x180" href="">
    <link rel="icon" type="image/png" sizes="32x32" href="">
    <link rel="icon" type="image/png" sizes="16x16" href="">
    <link rel="manifest" href="">
        <!-- Using predifined ProxiTok config -->
        <meta property="og:title" content="Home">
        <meta property="og:description" content="Alternative frontend for TikTok">
        <meta property="twitter:title" content="Home">
        <meta property="twitter:description" content="Alternative frontend for TikTok">
    <meta property="og:site_name" content="ProxiTok">
    <meta property="og:type" content="website">
    <meta property="twitter:card" content="summary">
    <meta property="twitter:site" content="ProxiTok">
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href="">
    <title>Home - ProxiTok</title>
</head>

<body>
    <section class="hero is-fullheight">
        <div class="hero-head">
<nav class="navbar" role="navigation" aria-label="main navigation">
  <div class="navbar-brand">
      <a href="" class="navbar-item">

<span class="icon-text">
<span class="icon">
    <i class="gg-home"></i>
</span>
    <span>ProxiTok</span>
</span>
        </a>
    <a role="button" id="navbar-burger" class="navbar-burger" aria-label="menu" aria-expanded="false">
      <span aria-hidden="true"></span>
      <span aria-hidden="true"></span>
      <span aria-hidden="true"></span>
    </a>
  </div>

  <div id="navbar-menu" class="navbar-menu">
    <div class="navbar-start">
      <a href="" class="navbar-item">

<span class="icon-text">
<span class="icon">
    <i class="gg-options"></i>
</span>
    <span>Settings</span>
</span>
            </a>
      <a href="" class="navbar-item">

<span class="icon-text">
<span class="icon">
    <i class="gg-info"></i>
</span>
    <span>About</span>
</span>
            </a>
    </div>
        <div class="navbar-end">
            <a href="[https://github.com/pablouser1/ProxiTok](view-source:https://github.com/pablouser1/ProxiTok)" class="navbar-item" target="_blank">

<span class="icon-text">
<span class="icon">
    <i class="gg-code-slash"></i>
</span>
    <span>Source</span>
</span>
            </a>
        </div>
  </div>
</nav>
<script src=""></script>
....

Compose Logs

[root@dashy ProxiTok]# docker compose logs
sign  | App listening on port: 8080
proxitok-web  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.48.4. Set the 'ServerName' directive globally to suppress this message
proxitok-web  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.48.4. Set the 'ServerName' directive globally to suppress this message
proxitok-web  | [Fri Jun 30 12:11:38.933351 2023] [mpm_prefork:notice] [pid 15] AH00163: Apache/2.4.57 (Debian) PHP/8.2.7 configured -- resuming normal operations
proxitok-web  | [Fri Jun 30 12:11:38.933372 2023] [core:notice] [pid 15] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
redishost     | 1:C 30 Jun 2023 12:10:35.903 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redishost     | 1:C 30 Jun 2023 12:10:35.903 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
redishost     | 1:C 30 Jun 2023 12:10:35.903 # Configuration loaded
redishost     | 1:M 30 Jun 2023 12:10:35.903 # Server initialized
redishost     | 1:M 30 Jun 2023 12:10:35.903 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[root@dashy ProxiTok]# docker compose logs -f
sign          | App listening on port: 8080
redishost     | 1:C 30 Jun 2023 12:10:35.903 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redishost     | 1:C 30 Jun 2023 12:10:35.903 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
redishost     | 1:C 30 Jun 2023 12:10:35.903 # Configuration loaded
redishost     | 1:M 30 Jun 2023 12:10:35.903 # Server initialized
redishost     | 1:M 30 Jun 2023 12:10:35.903 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
proxitok-web  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.48.4. Set the 'ServerName' directive globally to suppress this message
proxitok-web  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.48.4. Set the 'ServerName' directive globally to suppress this message
proxitok-web  | [Fri Jun 30 12:11:38.933351 2023] [mpm_prefork:notice] [pid 15] AH00163: Apache/2.4.57 (Debian) PHP/8.2.7 configured -- resuming normal operations
proxitok-web  | [Fri Jun 30 12:11:38.933372 2023] [core:notice] [pid 15] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
proxitok-web  | 192.168.48.1 - foo [30/Jun/2023:12:11:46 +0000] "GET / HTTP/1.1" 200 1359 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:114.0) Gecko/20100101 Firefox/114.0"
proxitok-web  | 192.168.48.1 - - [30/Jun/2023:12:11:47 +0000] "GET /favicon.ico HTTP/1.1" 200 15653 "http://tiktok.dashy.fts" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:114.0) Gecko/20100101 Firefox/114.0"
proxitok-web  | 192.168.48.1 - foo [30/Jun/2023:12:11:51 +0000] "GET / HTTP/1.1" 200 1359 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:114.0) Gecko/20100101 Firefox/114.0"

Enviroment (please complete the following information):

cron410 commented 1 year ago

I tried with older versions of both Redis and the Proxitok container, haven't found a good combination yet.

  proxitok-web:
    container_name: proxitok-web
#    image: ghcr.io/pablouser1/proxitok@sha256:c7940983ce87464c8f5ca001644a511686ba42fc2cfce62a83b6304db2120ac1
#    image: ghcr.io/pablouser1/proxitok@sha256:a35d2b24064505677ad0fd85283785583d895436445bb7415d4506a3e170ab5c
    image: ghcr.io/pablouser1/proxitok@sha256:80ccad758027ff0367ee640935ec97fcb32f42fdab5a800032ec0a63690f1196
    ports:
      - 8666:80
    environment:
      - APP_URL='http://10.1.1.10'
      - LATTE_CACHE=/cache
      - API_CACHE=redis
      - REDIS_HOST=proxitok-redis
      - REDIS_PORT=6379
      - API_SIGNER=remote
      - API_SIGNER_URL=http://proxitok-signer:8080/signature
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-file: "5"
        max-size: 10m
    volumes:
      - proxitok-cache:/cache
    depends_on:
      - proxitok-redis
      - proxitok-signer
    networks:
      - proxitok
#    security_opt:
#      - no-new-privileges:true
#    cap_drop:
#      - ALL
#    cap_add:
#      - CHOWN
#      - SETGID
#      - SETUID

  proxitok-redis:
    container_name: proxitok-redis
#    image: redis:7-alpine
    image: redis:7.0.10-alpine3.17
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-file: "5"
        max-size: 10m
    command: redis-server --save 60 1 --loglevel warning
    networks:
      - proxitok
#    user: nobody
#    read_only: true
#    security_opt:
#      - no-new-privileges:true
#    tmpfs:
#      - /data:size=10M,mode=0770,uid=65534,gid=65534,noexec,nosuid,nodev
#    cap_drop:
#      - ALL
pablouser1 commented 1 year ago

Hi. I'm not able to reproduce this issue. With the current Docker Image + Docker Compose file and using the command

APP_URL=https://example.com docker compose up

I have a valid intsance with all assets loading properly.

printfuck commented 1 year ago

It was entirely my fault. I quoted the APP_URL with single quotes:

APP_URL='https://tiktok.my.url.tld'

Thanks for taking your time to look into the issue :smiley:

ac615223s5 commented 4 months ago

the quotes are used at https://github.com/pablouser1/ProxiTok/wiki/Self-hosting, should they be removed?