diff options
Diffstat (limited to 'deployments')
| -rw-r--r-- | deployments/archlinux/PKGBUILD | 26 | ||||
| -rw-r--r-- | deployments/docker/Dockerfile | 13 | ||||
| -rw-r--r-- | deployments/systemd/fwdsms.service | 13 |
3 files changed, 52 insertions, 0 deletions
diff --git a/deployments/archlinux/PKGBUILD b/deployments/archlinux/PKGBUILD new file mode 100644 index 0000000..c5d254c --- /dev/null +++ b/deployments/archlinux/PKGBUILD @@ -0,0 +1,26 @@ +# SPDX-FileCopyrightText: © 2020 Grégoire Duchêne <gduchene@awhk.org> +# SPDX-License-Identifier: ISC + +# Maintainer: Grégoire Duchêne <gduchene@awhk.org> +pkgname=fwdsms +pkgver=0.1 +pkgrel=1 +arch=(x86_64) +url=https://github.com/gduchene/fwdsms +license=(custom:ISC) +makedepends=(go) +source=(git://github.com/gduchene/fwdsms.git) +sha256sums=(SKIP) + +build() { + cd ${pkgname}/cmd/${pkgname} + go build +} + +package() { + cd ${pkgname} + install -Dm755 cmd/${pkgname}/${pkgname} ${pkgdir}/usr/bin/${pkgname} + install -Dm644 configs/example.yaml ${pkgdir}/etc/${pkgname}.yaml + install -Dm644 deployments/systemd/${pkgname}.service ${pkgdir}/usr/lib/systemd/system/${pkgname}.service + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} diff --git a/deployments/docker/Dockerfile b/deployments/docker/Dockerfile new file mode 100644 index 0000000..0246f1f --- /dev/null +++ b/deployments/docker/Dockerfile @@ -0,0 +1,13 @@ +# SPDX-FileCopyrightText: © 2020 Grégoire Duchêne <gduchene@awhk.org> +# SPDX-License-Identifier: ISC + +FROM golang:1.15 +WORKDIR /root +COPY . ./ +RUN go install ... + +FROM scratch +COPY --from=0 /go/bin/fwdsms /usr/bin/fwdsms + +EXPOSE 8008 +ENTRYPOINT ["/usr/bin/fwdsms"] diff --git a/deployments/systemd/fwdsms.service b/deployments/systemd/fwdsms.service new file mode 100644 index 0000000..a095805 --- /dev/null +++ b/deployments/systemd/fwdsms.service @@ -0,0 +1,13 @@ +# SPDX-FileCopyrightText: © 2020 Grégoire Duchêne <gduchene@awhk.org> +# SPDX-License-Identifier: ISC + +[Unit] +Description=SMS-to-email Forwarder + +[Service] +ExecStart=fwdsms +DynamicUser=true +RuntimeDirectory=fwdsms + +[Install] +WantedBy=multi-user.target |
