mirror of
https://github.com/coderofsalvation/podi.git
synced 2025-12-15 19:37:42 +01:00
minor fixes
This commit is contained in:
@@ -62,3 +62,4 @@ $ ./podi init git@yourserver:/home/git/myapp master
|
||||
## Docs
|
||||
|
||||
* [adding your own recipes](doc/recipes.md)
|
||||
* [starting podi at server boot](doc/systemd.md)
|
||||
|
||||
37
doc/systemd.md
Normal file
37
doc/systemd.md
Normal file
@@ -0,0 +1,37 @@
|
||||
basically `/podi start` is to be called some way or another
|
||||
|
||||
## systemd example
|
||||
|
||||
Many servers use systemd, so you can modify the text below and put it into `/etc/systemd/system/your-container.service`:
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=your-container
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=username
|
||||
Group=username
|
||||
RemainAfterExit=yes
|
||||
WorkingDirectory=/home/username/repository
|
||||
ExecStart=/home/username/repository/podi start
|
||||
ExecStop=/home/username/repository/podi stop
|
||||
Type=forking
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target default.target
|
||||
```
|
||||
|
||||
and then run:
|
||||
|
||||
```
|
||||
$ systemctl daemon-reload
|
||||
$ systemctl start your-container
|
||||
$ systemctl status your-container
|
||||
(edit the service-file if it didn't work, and retry the 3 lines above)
|
||||
$ systemctl enable your-container
|
||||
```
|
||||
|
||||
> voila..now it will persist across reboots
|
||||
1
podi
1
podi
@@ -3,6 +3,7 @@ set -e
|
||||
required="awk ssh git hostname basename"
|
||||
test -z $HOST && host=$USER@$(hostname) || host=$HOST
|
||||
test -z "$RECIPE_REPOS" && RECIPE_REPOS="https://raw.githubusercontent.com/coderofsalvation/podi/master/recipe/index.txt"
|
||||
test -z $PODI_APP && export PODI_APP=$(basename $(pwd))
|
||||
#trap "trigger cleanup" 0 1 2 3 6
|
||||
C_GREY="\\033[1;30m"
|
||||
C_BOLD="\\033[1;37;40m"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# info: containerized app, nice starting point for Dockerfile + app
|
||||
|
||||
export POD=$(which podman || which docker || echo "")
|
||||
|
||||
hint_systemd(){
|
||||
|
||||
Reference in New Issue
Block a user