selfhosters / unRAID-CA-templates

An Unraid community repo where you can request unRAID container templates to be added to Community Applications: Squidly271/community.applications.
MIT License
149 stars 81 forks source link

CA Template Request - Spacebar Chat Server #510

Closed Shiroe93 closed 3 weeks ago

Shiroe93 commented 4 weeks ago

Application does not already exist

Application is actively supported

Link to Docker Hub or GitHub Container Registry

https://hub.docker.com/r/spacebarchat/server

Link to documentation

https://docs.spacebar.chat/setup/server/

Link to source code

https://github.com/spacebarchat/server

Shiroe93 commented 4 weeks ago

I've tried to build a template myself with some help from the unraid reddit community but when I select the template in the drop down menu it's completely blank so I suppose I'm missing something

spacebar.txt (for some reason the code doesn't keep the correct format so i uploaded a txt since xml is not supported by github)

nwithan8 commented 4 weeks ago

@Shiroe93 Hello from Reddit (u/grtgbln). Feedback loop is going to be a lot easier here than on that Reddit thread. I'll test this out on my machine and see if I can help.

Shiroe93 commented 4 weeks ago

Thanks let me know if you need anything

nwithan8 commented 3 weeks ago

I was having trouble with the SQLite variant of the container, issues with write permissions. I'd be curious to see if the PostgresSQL variant works better. Looking at their documentation, Postgres is recommended for 2+ users anyway, and when running the SQLite variant, the logs liked to keep reminding me to use the Postgres variant.

If you can try to run this on your machine and report back to me if it works for you, as you have more experience with the software than I probably do.

<?xml version="1.0"?>
<Container version="3.9">
    <Name>spacebarchat</Name>
    <Repository>spacebarchat/server:latest-postgressql</Repository>
    <Registry>https://hub.docker.com/r/spacebarchat/server</Registry>
    <Branch>
        <Tag>latest-postgressql</Tag>
        <TagDescription>Latest stable release with PostgreSQL support</TagDescription>
    </Branch>
    <Branch>
        <Tag>latest-postgressql-amd64</Tag>
        <TagDescription>Latest stable release with PostgreSQL support for AMD64</TagDescription>
    </Branch>
    <Branch>
        <Tag>latest-postgressql-arm64</Tag>
        <TagDescription>Latest stable release with PostgreSQL support for ARM64</TagDescription>
    </Branch>
    <Network>bridge</Network>
    <WebUI>http://[IP]:[PORT:3001]/</WebUI>
    <Privileged>false</Privileged>
    <Support>https://docs.spacebar.chat</Support>
    <Project>https://spacebar.chat</Project>
    <Overview>
        A free and open source, full-stack reverse engineering and reimplementation of Discord.
    </Overview>
    <Beta>False</Beta>
    <Category>Network:Messenger Network:Privacy Other: Productivity: Tools: Status Stable</Category>
    <ExtraSearchTerms>Discord private chat channels social</ExtraSearchTerms>
    <Icon>https://raw.githubusercontent.com/selfhosters/unRAID-CA-templates/master/templates/img/spacebar.png</Icon>
    <TemplateURL>https://raw.githubusercontent.com/selfhosters/unRAID-CA-templates/master/template/spacebar.xml</TemplateURL>
    <Maintainer>
        <WebPage>https://github.com/selfhosters</WebPage>
    </Maintainer>
    <Requires>
        Requires a separate PostgresSQL container, see the documentation for more information. https://hub.docker.com/r/spacebarchat/server &#xD;
        [br]
        AWS S3 can also be used as a storage provider, see the documentation for more information. https://hub.docker.com/r/spacebarchat/server
    </Requires>
    <Changes>
        ### 2024-08-19

        Initial release
    </Changes>
    <Config Name="Web UI" Target="3001" Default="3001" Mode="tcp" Description="Container Port: 3001" Type="Port" Display="always" Required="true" Mask="false">3001</Config>
    <Config Name="Database connection" Target="DATABASE" Default="postgres://USERNAME:PASSWORD@IP_ADDRESS:5432/DATABASE_NAME" Mode="rw" Description="Connection URL to PostgresSQL database" Type="Variable" Display="always-hide" Required="true" Mask="false"/>
    <Config Name="Asset storage" Target="/exec/persistent/storage/" Default="/mnt/user/appdata/spacebar/storage" Mode="rw" Description="Path to asset storage" Type="Path" Display="advanced" Required="true" Mask="false">/mnt/user/appdata/spacebar/storage</Config>
    <Config Name="Storage provider type" Target="STORAGE_PROVIDER" Default="file" Mode="rw" Description="Type of storage provider" Type="Variable" Display="advanced-hide" Required="true" Mask="false">file</Config>
    <Config Name="Storage provider internal path" Target="STORAGE_LOCATION" Default="/exec/persistent/storage/" Mode="rw" Description="Internal path to storage provider" Type="Variable" Display="advanced-hide" Required="true" Mask="false">/exec/persistent/storage/</Config>
    <Config Name="Internal port" Target="PORT" Default="3001" Mode="rw" Description="Internal port to bind to" Type="Variable" Display="advanced-hide" Required="true" Mask="false">3001</Config>
    <Config Name="PUID" Target="PUID" Default="099" Description="" Type="Variable" Display="advanced" Required="true" Mask="false">099</Config>
    <Config Name="PGID" Target="PGID" Default="100" Description="" Type="Variable" Display="advanced" Required="true" Mask="false">100</Config>
</Container>
Shiroe93 commented 3 weeks ago

i have to fill this with my value or are these variable that will be replace once i complete conging for the ui? immagine i aked you because right know the web ui doesn't open and after 2 minutes the container stops on it's own

side note: the link you used for the icon doesn't show anything immagine

nwithan8 commented 3 weeks ago

i have to fill this with my value or are these variable that will be replace once i complete conging for the ui? immagine i aked you because right know the web ui doesn't open and after 2 minutes the container stops on it's own

side note: the link you used for the icon doesn't show anything immagine

You would have to fill out that "Database connection", those are just placeholder values.

The icon won't load because it points to an image that does not (yet) exist.

Shiroe93 commented 3 weeks ago

Understood i have to look into how to create a PostreSQL database because I've never done it before

edit found a tutorial but the spacebar docs don't mention any specific version do you have any suggestions? unraid has version 12, 13, 14, 15, 16, and alpine (wich i suppose is based on alpine linux)

nwithan8 commented 3 weeks ago

Understood i have to look into how to create a PostreSQL database because I've never done it before

edit found a tutorial but the spacebar docs don't mention any specific version do you have any suggestions? unraid has version 12, 13, 14, 15, 16, and alpine (wich i suppose is based on alpine linux)

The docs for Spacebar's Docker Compose use 15

Shiroe93 commented 3 weeks ago

i must have missed it thank you

Shiroe93 commented 3 weeks ago

i have istalled the postgres 15 container then tried with the default postgres database and with one created by me (user and database with all the permissions granted) but the spacebar container keeps stopping on his own error in the log says "uri malformed"

this are the comand i used in postgres to crate the new user and database postgres=# create database mydb; postgres=# create user myuser with encrypted password 'mypass'; postgres=# grant all privileges on database mydb to myuser; and all went without issues

nwithan8 commented 3 weeks ago

i have istalled the postgres 15 container then tried with the default postgres database and with one created by me (user and database with all the permissions granted) but the spacebar container keeps stopping on his own error in the log says "uri malformed"

this are the comand i used in postgres to crate the new user and database postgres=# create database mydb; postgres=# create user myuser with encrypted password 'mypass'; postgres=# grant all privileges on database mydb to myuser; and all went without issues

Would you mind sharing the "Database connection" URL that you are using?

Shiroe93 commented 3 weeks ago

postgres://shiroe:mypassword@192.168.50.12:5432/spacebar ( name a gave to the database)

Shiroe93 commented 3 weeks ago

i tried search in the spacebar docs but it seems correct and i checked inside postgres console and the database is working and accessible with the correct credential here's the full log immagine

Shiroe93 commented 3 weeks ago

after solving another 3-4 error i have finally manage to make it start

nwithan8 commented 3 weeks ago

after solving another 3-4 error i have finally manage to make it start

Oh, please do share.

Shiroe93 commented 3 weeks ago

Two major problem had arise 1 postgres connection url did not like password with special characters 2 even if you grant al privileges on a database for a specific user do to new security feature in postgres 15 you also have to grant authority to schema public separately

`CREATE DATABASE EXAMPLE_DB; CREATE USER EXAMPLE_USER WITH ENCRYPTED PASSWORD 'Sup3rS3cret'; GRANT ALL PRIVILEGES ON DATABASE EXAMPLE_DB TO EXAMPLE_USER; \c EXAMPLE_DB postgres

You are now connected to database "EXAMPLE_DB" as user "postgres".

GRANT ALL ON SCHEMA public TO EXAMPLE_USER; ` (All in lower case)

Now i only have to hope that I'm able to understand the rest of the docs and complete deployment but the container part is done so i think you can consider it as working It The first time in years that i find something so articulate that hasn't had a tutorial been made

Shiroe93 commented 3 weeks ago

can confirm is working even if unfortunately it didn't have the voice chat feature i was looking for (not implemented yet) so it's not a full discord replacement for those who might been interested i'm currently looking into Mirotalk that is more similar to google meet