C9Glax / tranga-website

Web-Frontend for Tranga-API
GNU General Public License v3.0
17 stars 10 forks source link

How to "Build" the Docker Container ? #56

Closed ghost closed 6 months ago

ghost commented 6 months ago

Im trying to use @db-2001 settings repo, but im failing to understand on how to deploy this correctly from source. Im using Docker and my compose file looks like this:

services:
  tranga-api:
    image: glax/tranga-api:cuttingedge
    container_name: tranga-api
    volumes:
      - /root/manga:/Manga
      - ./settings:/usr/share/tranga-api
    ports:
      - "127.0.0.1:6531:6531"
    restart: unless-stopped
  tranga-website:
    #image: glax/tranga-website:cuttingedge
    build: ./tranga-website
    container_name: tranga-website
    ports:
      - "127.0.0.1:3000:80"
    depends_on:
      - tranga-api
    restart: unless-stopped

i cloned db's settings repo into ./tranga-website and it does seem to look like docker is building it and starting it, yet it doesnt seem to work and i get a blank nginx page when accessing the tranga website url.

db-2001 commented 6 months ago

There is a reason my branch hasn't been merged into cutting edge or master yet. I'm still waiting on API changes on @C9Glax side. The website is currently incompatible with the existing APi.

If you insist on going this route, you won't have full functionality, but make sure you are cloning the repo into the same place where the tranga-website container stores the original files AND DELETE the original files. The webserver doesn't know what to do with 2 index.htmls

Finally as a last point, you don't need 127.0.0.1 in your docker compose files. "6531:6531" will work just fine for exposing the port.

You also said you were accessing the website via a URL, this may imply you have a reverse proxy set up. Make sure the reverse-proxy URL is pointed to the correct IP:PORT combination, which in your case should be :3000

db-2001 commented 6 months ago

@ElryWeeb it has now been merged in, feel free to use the official docker image to try it out :)

ghost commented 6 months ago

Thank you for the info