Skip to content

Commit

Permalink
Merge pull request #28 from kalio007/dev
Browse files Browse the repository at this point in the history
Added the systemd config
  • Loading branch information
Idimmusix authored Jul 20, 2024
2 parents bfe6384 + 20d5e88 commit d31fb2d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ jobs:
run: yarn install
- name: buld the dist
run: yarn build

- name: setup service file
run: sudo cp server-script/aihomeworkdev.service /etc/systemd/system
- name: start the app
run: |
sudo systemctl deamon-reload
sudo systemsctl restart aihomwworkdev
# test:
# -name: Run test
# run: yarn jest
Expand Down
13 changes: 13 additions & 0 deletions server-script/aihomeworkdev.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=AIHomework-Dev
After=network.target

[Service]
WorkingDirectory=/var/www/aihomework/dev
ExecStart=/bin/bash /var/www/aihomework/dev/server-script/startappdev.sh
#Restart=on-failure
#RestartSec=20s
StartLimitInterval=0

[Install]
WantedBy=multi-user.target
4 changes: 4 additions & 0 deletions server-script/startappdev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!bin/bash

cd /var/www/aihomework/dev/
/usr/bin/yarn prod

0 comments on commit d31fb2d

Please sign in to comment.