Skip to content

Commit

Permalink
in-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
faabiosr committed Oct 21, 2023
1 parent 37d673c commit b29e910
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ nfpms:
license: MIT
formats:
- deb
contents:
- src: "env/debian/movies.service"
dst: "/lib/systemd/system/movies.service"
- src: "env/debian/movies.conf"
dst: "/etc/default/movies"
type: config
scripts:
preinstall: "env/debian/pre-install.sh"
preremove: "env/debian/pre-remove.sh"
Expand Down
14 changes: 14 additions & 0 deletions env/debian/movies.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ---------------------------------
# Movies configuration file
# ---------------------------------
#
# The commented-out settings shown in this file represent the default values.
#
# This file is read when movies service start
#
# -----------------------------------------------------------------------------
# Datastore
# -----------------------------------------------------------------------------

# Database path configuration
MOVIES_DB_PATH="/var/lib/movies-demo"
14 changes: 14 additions & 0 deletions env/debian/movies.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Movies-demo - manages movie collection throught API
Documentation="https://github.com/faabiosr/go-movies-demo"

[Service]
EnvironmentFile=/etc/default/movies
ExecStart=/usr/local/bin/movies
Restart=on-failure
User=www-data
Group=www-data
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target

0 comments on commit b29e910

Please sign in to comment.