Empaquetage Debian basique
This commit is contained in:
parent
7f7b187296
commit
1d526a37d0
@ -2,8 +2,8 @@
|
||||
# so I only need to overwrite some values
|
||||
inherits: dev
|
||||
|
||||
app_name: "Backend Production"
|
||||
host_port: 0.0.0.0:8080
|
||||
app_name: "Daddy Backend"
|
||||
host_port: 127.0.0.1:8080
|
||||
web_ui: false
|
||||
|
||||
# debug, info, warn, error, fatal, panic, disable
|
||||
@ -50,18 +50,22 @@ enable_tracing: true
|
||||
|
||||
database:
|
||||
type: postgres
|
||||
host: db
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
dbname: backend_development
|
||||
user: postgres
|
||||
password: postgres
|
||||
dbname: daddy
|
||||
user: daddy
|
||||
#password: postgres
|
||||
#pool_size: 10
|
||||
#max_retries: 0
|
||||
#log_level: "debug"
|
||||
|
||||
# Set session variable "user.id" to the user id
|
||||
# Enable this if you need the user id in triggers, etc
|
||||
set_user_id: false
|
||||
set_user_id: true
|
||||
|
||||
# database ping timeout is used for db health checking
|
||||
ping_timeout: 5m
|
||||
ping_timeout: 5m
|
||||
|
||||
migrations_path: ./migrations
|
||||
|
||||
cors_allowed_origins: ["*"]
|
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: daddy
|
||||
Section: unknown
|
||||
Priority: optional
|
||||
Maintainer: Cadoles <contanct@cadoles.com>
|
||||
Build-Depends: debhelper (>= 8.0.0), wget, ca-certificates, tar, curl
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: http://forge.cadoles.com/Cadoles/daddy
|
||||
Vcs-Git: http://forge.cadoles.com/Cadoles/daddy.git
|
||||
Vcs-Browser: http://forge.cadoles.com/Cadoles/daddy
|
||||
|
||||
Package: daddy
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, nginx-full, super-graph, postgresql
|
||||
Description: Application de gestion des DADs à Cadoles
|
12
debian/daddy.service
vendored
Normal file
12
debian/daddy.service
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Service "super-graph" pour l'application Daddy
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/systemd/system/daddy.env
|
||||
ExecStart=/usr/bin/super-graph serv --path /usr/share/daddy/server/config
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
36
debian/rules
vendored
Normal file
36
debian/rules
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE=1
|
||||
|
||||
ifeq (, $(shell which node 2>/dev/null))
|
||||
override_dh_auto_build: install-nodejs
|
||||
endif
|
||||
|
||||
%:
|
||||
dh $@ --with systemd
|
||||
|
||||
override_dh_auto_build:
|
||||
cd frontend && npm install && npm run build
|
||||
|
||||
install-nodejs:
|
||||
wget -O- https://deb.nodesource.com/setup_12.x | bash -
|
||||
apt-get install -y nodejs
|
||||
|
||||
override_dh_auto_install:
|
||||
mkdir -p debian/daddy/usr/share/daddy/client/public
|
||||
mkdir -p debian/daddy/usr/share/daddy/server/config
|
||||
mkdir -p debian/daddy/etc/nginx/sites-available
|
||||
mkdir -p debian/daddy/etc/systemd/system
|
||||
|
||||
cp -r frontend/dist/* debian/daddy/usr/share/daddy/client/public/
|
||||
cp -r backend/config/* debian/daddy/usr/share/daddy/server/config/
|
||||
cp misc/debian/nginx/daddy.conf debian/daddy/etc/nginx/sites-available/
|
||||
cp misc/debian/systemd/daddy.env debian/daddy/etc/systemd/system/
|
||||
|
||||
install -d debian/daddy
|
||||
|
||||
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)
|
15
misc/debian/nginx/daddy.conf
Normal file
15
misc/debian/nginx/daddy.conf
Normal file
@ -0,0 +1,15 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name daddy.local;
|
||||
|
||||
root /usr/share/daddy/client/public;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html =404;
|
||||
}
|
||||
|
||||
location /api/v1/graphql {
|
||||
proxy_pass http://127.0.0.1:8080/api/v1/graphql;
|
||||
}
|
||||
}
|
1
misc/debian/systemd/daddy.env
Normal file
1
misc/debian/systemd/daddy.env
Normal file
@ -0,0 +1 @@
|
||||
GO_ENV=prod
|
Loading…
Reference in New Issue
Block a user