Last active 1 week ago

tre revised this gist 1 week ago. Go to revision

1 file changed, 1 insertion

example.service

@@ -6,6 +6,7 @@ After=network.target
6 6 User=specific user for this service
7 7 Group=specific user for this service
8 8 WorkingDirectory=directory from which to run the service
9 + Environment="PATH=/…/venv/bin" # if it’s being run in a venv
9 10 ExecStart=command to run the service
10 11 Restart=on-failure
11 12

tre revised this gist 2 weeks ago. Go to revision

1 file changed, 1 insertion

example.service

@@ -5,6 +5,7 @@ After=network.target
5 5 [Service]
6 6 User=specific user for this service
7 7 Group=specific user for this service
8 + WorkingDirectory=directory from which to run the service
8 9 ExecStart=command to run the service
9 10 Restart=on-failure
10 11

tre revised this gist 2 weeks ago. Go to revision

1 file changed, 1 deletion

example.service

@@ -5,7 +5,6 @@ After=network.target
5 5 [Service]
6 6 User=specific user for this service
7 7 Group=specific user for this service
8 - WorkingDirectory=/home/fastapi/fastapi-app
9 8 ExecStart=command to run the service
10 9 Restart=on-failure
11 10

tre revised this gist 2 weeks ago. Go to revision

1 file changed, 13 insertions

example.service(file created)

@@ -0,0 +1,13 @@
1 + [Unit]
2 + Description=description of the service
3 + After=network.target
4 +
5 + [Service]
6 + User=specific user for this service
7 + Group=specific user for this service
8 + WorkingDirectory=/home/fastapi/fastapi-app
9 + ExecStart=command to run the service
10 + Restart=on-failure
11 +
12 + [Install]
13 + WantedBy=multi-user.target
Newer Older