jrcichra / lancache-rpi

(Unofficial RPI Version) - A lancache service capable of caching all CDNs in a single instance
53 stars 11 forks source link

Start Docker-compose with Boot #11

Closed ToeKnee44 closed 4 years ago

ToeKnee44 commented 4 years ago

Is there a way to make the container start automatically when the raspberry pi starts up?

jrcichra commented 4 years ago

Sure, you can add restart: always to each container in the yaml. That will start it across boots. We should make this the default. I'll keep this issue open and include that as a fix.

ToeKnee44 commented 4 years ago

is this correct?

version: '3' services: dns: image: jrcichra/lancachenet-lancache-dns:latest ## Pulling DNS server for arm env_file: .env ports:

jrcichra commented 4 years ago

That should work. I just committed this fix: https://github.com/jrcichra/lancache-rpi/commit/9c6623578ec7454cffe3cecbf752f5a6516340ed

ToeKnee44 commented 4 years ago

Maybe I did it wrong but when I added those lines to each section it didn't start automatically and then when I went to manually start it I got this error: ERROR: yaml.scanner.ScannerError: while scanning for the next token found character '\t' that cannot start any token in "./docker-compose.yml", line 8, column 1

ToeKnee44 commented 4 years ago

How do I update my repository? do I just pull from this line of code sudo git clone https://github.com/jrcichra/lancache-rpi.git?

jrcichra commented 4 years ago

Yes, if you already did a git clone before to create it, you should be able to do git pull from within the directory. Downloading another copy of the zip file works too.