-
Notifications
You must be signed in to change notification settings - Fork 118
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
Automatic start on Linux with reboot #47
Comments
You must run this first then sudo nano /etc/systemd/system/anvil_Jack.service [Unit] [Service] sudo chmod 644 /etc/systemd/system/anvil_Jack.service sudo systemctl start anvil_Jack.service Done sudo systemctl stop anvil_Jack.service |
Hi @jd710313, Are you still having this problem? My guess is that you've got something squiffly in how you're specifying your app's config, so the App Server is refusing to start and that tiny fragment of log you're seeing is the last line of the usage message (summarising the available command-line arguments). If you try printing the whole log (with |
Hi Meredyd, Thanks I eventually got it working. I can't remember the exact solution, but looking at my notes I believe there was an unprivileged port issue for the service that I had to enable with: It was running on a Raspberry Pi with their OS, so this could have been issues specific to the Pi. Anyway I got it running and it is really impressive to see this full-stack app running on a Pi! |
I got the app server to work on Linux and it is a really elegant solution with everything packaged in one installation and for the full stack!
It does however require manual user startup through the:
anvil-app-server --app
command and I would like to get it to start up with the Linux OS. I tried using a systemd service:
[Unit]
Description=Anvil Material_Design_1
After=multi-user.target
[Service]
Type=idle
ExecStart=/home/anvil/env/bin/python /home/anvil/env/bin/anvil-app-server --app Material_Design_1 > /home/anvil/Material_Design_1.log 2>&1
WorkingDirectory=/home/anvil
User=anvil
[Install]
WantedBy=multi-user.target
but it does not start successfully as a service and I get the following error:
Material_Design_1.service - Anvil Material_Design_1
Loaded: loaded (/etc/systemd/system/Material_Design_1.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-09-21 17:13:29 SAST; 22min ago
Sep 21 17:13:29 raspberrypi python[12481]: --microsoft-app-id APP_ID App ID to use for Microsoft authentSep 21 17:13:29 raspberrypi systemd[1]: Material_Design_1.service: Main process exited, code=exited, status=1/FAILURE
Sep 21 17:13:29 raspberrypi systemd[1]: Material_Design_1.service: Failed with result 'exit-code'.
The manual startup from the terminal does work.
Is there perhaps a solution or guide on how to get the app server to start automatically with startup of the OS?
Thanks
The text was updated successfully, but these errors were encountered: