Skip to content

Commit

Permalink
Consolidate services
Browse files Browse the repository at this point in the history
  • Loading branch information
mhadam committed Nov 5, 2023
1 parent 128a07b commit b3896e8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 27 deletions.
6 changes: 2 additions & 4 deletions devops/install_systemd_units.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ cp ./systemd/*.{service,path} /etc/systemd/system/
systemctl daemon-reload

systemctl enable deploy-caddy.{path,service}
systemctl enable princetonpy-cron.service
systemctl enable princetonpy-web.service
systemctl enable princetonpy.service
systemctl start deploy-caddy.{path,service}
systemctl start princetonpy-cron.service
systemctl start princetonpy-web.service
systemctl start princetonpy.service
17 changes: 0 additions & 17 deletions devops/systemd/princetonpy-cron.service

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[Unit]
Description=PrincetonPy web service
Description=PrincetonPy services
After=docker.service
Requires=docker.service

[Service]
TimeoutStartSec=120
Restart=always
RemainAfterExit=yes
ExecStart=/usr/bin/docker compose \
-f /home/princeton/deployed/docker-compose.prod.yml \
up web
up -d
ExecStop=/usr/bin/docker compose \
-f /home/princeton/deployed/docker-compose.prod.yml \
down web
down -d

[Install]
WantedBy=default.target
3 changes: 1 addition & 2 deletions devops/uninstall_systemd_units.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env bash

systemctl disable deploy-caddy.{path,service}
systemctl disable princetonpy-cron.service
systemctl disable princetonpy-web.service
systemctl disable princetonpy.service
systemctl daemon-reload
# rm ./systemd/deploy-caddy.{path,service}

0 comments on commit b3896e8

Please sign in to comment.