Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run master branch as Docker image #9

Open
luckman212 opened this issue Oct 8, 2021 · 5 comments
Open

Run master branch as Docker image #9

luckman212 opened this issue Oct 8, 2021 · 5 comments

Comments

@luckman212
Copy link

Thanks for this project/fork!

I was able to run the docker image, but I wanted to use the default-random-filename = false flag. Seems that running it via

docker run -p 8080:8080 -v /root/linx-server/linx-server.conf:/data/linx-server.conf -v /root/linx-server/meta:/data/meta -v /root/linx-server/files:/data/files andreimarcu/linx-server -config /data/linx-server.conf

...doesn't get you the latest bits that have that flag available.

I'm not good at Docker - does anyone know the right way to run it "locally" from the cloned repo? Or a way to invoke Docker so it grabs the master branch?

🙏

@luckman212
Copy link
Author

Also, I don't care about running in Docker to be honest, I am basically just asking how to run from the master branch, even if that's just cloning the repo manually and compiling myself -- is it as simple as go build?

@luckman212
Copy link
Author

Ok, I answered my own question 👍

I decided not to use Docker - for me it's overkill. I cloned the repo, installed go, built the binary and created a daemon for systemd. Not sure if that's the right way, but all's working well so far...

vi /lib/systemd/system/linx-server.service

contents:

[Unit]  
Description=linx-server
  
[Service]  
Type=simple
Restart=always
RestartSec=5s
ExecStart=/root/linx-server/linx-server -config /root/linx-server/linx-server.conf
  
[Install]  
WantedBy=multi-user.target

Start it

systemctl enable linx-server.service
systemctl start linx-server.service

@onvrb
Copy link

onvrb commented Oct 20, 2021

instead of specifying "andreimarcu/linx-server" as the docker image you'd have to clone the rep and specify build path at the docker run command.
you should consider using docker instead ;)

@luckman212
Copy link
Author

Ok thanks @onvrb

For anyone else who is not a docker expert, I figured out how to do this, maybe this helps somebody...

This is just an example, change $LD to whatever path on the host you want your data stored in, and edit linx-server.conf as needed...

git clone https://github.com/ZizzyDizzyMC/linx-server
cd linx-server
docker build -t linx-master .
LD=/tmp/linx
mkdir $LD $LD/meta $LD/files
cp linx-server.conf.example $LD/linx-server.conf
docker run -p 8080:8080 -v $LD/linx-server.conf:/data/linx-server.conf -v $LD/meta:/data/meta -v $LD/files:/data/files linx-master -config /data/linx-server.conf

@dotcomUNDERGROUND
Copy link

dotcomUNDERGROUND commented Oct 16, 2022

@luckman212

I have followed your instructions, but get error with permission when uploading file.

Do I need to do anything with the permission of the directories created?

For anyone else who is not a docker expert, I figured out how to do this, maybe this helps somebody...

This is just an example, change $LD to whatever path on the host you want your data stored in, and edit linx-server.conf as needed...

git clone https://github.com/ZizzyDizzyMC/linx-server
cd linx-server
docker build -t linx-master .
LD=/tmp/linx
mkdir $LD $LD/meta $LD/files
cp linx-server.conf.example $LD/linx-server.conf
docker run -p 8080:8080 -v $LD/linx-server.conf:/data/linx-server.conf -v $LD/meta:/data/meta -v $LD/files:/data/files linx-master -config /data/linx-server.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants