Compare commits
10 Commits
987208dd03
...
pkg/dev/ub
Author | SHA1 | Date | |
---|---|---|---|
a41b2881d0 | |||
40b99585e1 | |||
7cf97b063b | |||
4f55a80dbe | |||
0c49035f28 | |||
fc90b2af93 | |||
ef4d5efd02 | |||
3020ab96b4 | |||
db7d0c1b36 | |||
4e008108d8 |
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
9
|
14
debian/control
vendored
Normal file
14
debian/control
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Source: fake-sms
|
||||||
|
Section: unknown
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Cadoles <contact@cadoles.com>
|
||||||
|
Build-Depends: debhelper (>= 8.0.0), wget, ca-certificates, tar, curl
|
||||||
|
Standards-Version: 3.9.4
|
||||||
|
Homepage: http://forge.cadoles.com/Cadoles/fake-sms
|
||||||
|
Vcs-Git: http://forge.cadoles.com/Cadoles/fake-sms.git
|
||||||
|
Vcs-Browser: http://forge.cadoles.com/Cadoles/fake-sms
|
||||||
|
|
||||||
|
Package: fake-sms
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
|
Description: Serveur d'envoi de SMS factice pour le développement avec interface web
|
1
debian/fake-sms.dirs
vendored
Normal file
1
debian/fake-sms.dirs
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
var/lib/fake-sms
|
11
debian/fake-sms.service
vendored
Normal file
11
debian/fake-sms.service
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Serveur d'envoi de SMS factice pour le développement avec interface web
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/fake-sms -workdir /usr/share/fake-sms -config /etc/fake-sms/config.yml
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
54
debian/rules
vendored
Normal file
54
debian/rules
vendored
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
# -*- makefile -*-
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
export DH_VERBOSE=1
|
||||||
|
|
||||||
|
GO_VERSION := 1.15.6
|
||||||
|
OS := linux
|
||||||
|
ARCH := amd64
|
||||||
|
GOPATH=$(HOME)/go
|
||||||
|
|
||||||
|
ifeq (, $(shell which go 2>/dev/null))
|
||||||
|
override_dh_auto_build: install-go
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq (, $(shell which node 2>/dev/null))
|
||||||
|
override_dh_auto_build: install-nodejs
|
||||||
|
endif
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with systemd
|
||||||
|
|
||||||
|
override_dh_auto_build: $(GOPATH)
|
||||||
|
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" make tooling
|
||||||
|
npm install
|
||||||
|
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" go mod vendor
|
||||||
|
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" ARCH_TARGETS=$(ARCH) make release
|
||||||
|
|
||||||
|
$(GOPATH):
|
||||||
|
mkdir -p $(GOPATH)
|
||||||
|
|
||||||
|
install-go:
|
||||||
|
wget https://dl.google.com/go/go$(GO_VERSION).$(OS)-$(ARCH).tar.gz
|
||||||
|
tar -C /usr/local -xzf go$(GO_VERSION).$(OS)-$(ARCH).tar.gz
|
||||||
|
|
||||||
|
install-nodejs:
|
||||||
|
curl -sL https://deb.nodesource.com/setup_14.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
mkdir -p debian/fake-sms/usr/share/fake-sms
|
||||||
|
mkdir -p debian/fake-sms/etc/fake-sms
|
||||||
|
mkdir -p debian/fake-sms/usr/bin
|
||||||
|
|
||||||
|
cp -r release/fake-sms-$(OS)-$(ARCH)/* debian/fake-sms/usr/share/fake-sms/
|
||||||
|
|
||||||
|
mv debian/fake-sms/usr/share/fake-sms/bin/fake-sms debian/fake-sms/usr/bin/fake-sms
|
||||||
|
mv debian/fake-sms/usr/share/fake-sms/config.yml debian/fake-sms/etc/fake-sms/config.yml
|
||||||
|
|
||||||
|
install -d debian/fake-sms
|
||||||
|
|
||||||
|
override_dh_strip:
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
3.0 (native)
|
@@ -1,11 +1,11 @@
|
|||||||
FROM reg.cadoles.com/dh/library/golang:1.17 AS build
|
FROM golang:1.15 AS build
|
||||||
|
|
||||||
ARG HTTP_PROXY=
|
ARG HTTP_PROXY=
|
||||||
ARG HTTPS_PROXY=
|
ARG HTTPS_PROXY=
|
||||||
ARG http_proxy=
|
ARG http_proxy=
|
||||||
ARG https_proxy=
|
ARG https_proxy=
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y build-essential git bash curl python2
|
RUN apt-get update && apt-get install -y build-essential git bash curl
|
||||||
|
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
|
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
|
||||||
&& apt-get install -y nodejs
|
&& apt-get install -y nodejs
|
||||||
@@ -23,15 +23,12 @@ RUN npm install \
|
|||||||
&& echo "---" > ./misc/release/config-patch.yml \
|
&& echo "---" > ./misc/release/config-patch.yml \
|
||||||
&& make ARCH_TARGETS=amd64 release
|
&& make ARCH_TARGETS=amd64 release
|
||||||
|
|
||||||
|
|
||||||
FROM busybox
|
FROM busybox
|
||||||
|
|
||||||
RUN adduser -D -h /app sms
|
|
||||||
|
|
||||||
COPY --from=build /src/release/fake-sms-linux-amd64 /app
|
COPY --from=build /src/release/fake-sms-linux-amd64 /app
|
||||||
RUN chown -R sms:sms /app
|
|
||||||
|
|
||||||
USER sms
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN mkdir -p /app
|
||||||
|
|
||||||
CMD ["bin/fake-sms", "--config", "config.yml"]
|
CMD ["bin/fake-sms", "--config", "config.yml"]
|
Reference in New Issue
Block a user