feat: docker

This commit is contained in:
dawnwinterLiu 2022-11-25 18:17:06 +08:00
parent cb970634e7
commit 42e6776a18
15 changed files with 352 additions and 1 deletions

1
.gitignore vendored
View File

@ -54,7 +54,6 @@ dist.zip
scripts/git-token
etc/*.seg
_upgrade_base/
data/
ci.sh
*.ipr
node_modules/

View File

@ -0,0 +1,27 @@
[Unit]
Description=dgiot server
After=network-online.target
Wants=network-online.target
[Service]
Type=forking
ExecStart=/bin/sh /data/dgiot/dgiot/bin/emqx start
User=root
Group=root
Environment=HOME=/data/dgiot/dgiot/erts-11.0
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,24 @@
[Unit]
Description=dgiot_parse_server server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/sbin/node /data/dgiot/dgiot_parse_server/server/index.js
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,27 @@
[Unit]
Description=dgiot_pg_writer server
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/local/pgsql/12/bin/postgres -D /data/dgiot/dgiot_pg_writer/data
User=postgres
Group=postgres
Environment=DATA_DIR=/data/dgiot/dgiot_pg_writer/data
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,24 @@
[Unit]
Description=dgiot_redis server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/sbin/redis/redis-server /usr/sbin/redis/redis.conf
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,24 @@
[Unit]
Description=dgiot_tdengine_mqtt server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/sbin/dgiot_tdengine_mqtt 127.0.0.1
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,26 @@
[Unit]
Description=gofastdfs server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/data/dgiot/go_fastdfs/file /data/dgiot/go_fastdfs
WorkingDirectory=/data/dgiot/go_fastdfs
Environment=GO_FASTDFS_DIR=/data/dgiot/go_fastdfs
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,24 @@
[Unit]
Description=nginx server
After=network-online.target
Wants=network-online.target
[Service]
Type=forking
ExecStart=/data/dgiot/nginx/sbin/nginx
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,24 @@
[Unit]
Description=nginx server
After=network-online.target
Wants=network-online.target
[Service]
Type=forking
ExecStart=/data/dgiot/nginx/sbin/nginx
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,24 @@
[Unit]
Description=dgiot_parse_server server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/sbin/node /data/dgiot/dgiot_parse_server/server/index.js
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,27 @@
[Unit]
Description=dgiot_pg_writer server
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/local/pgsql/12/bin/postgres -D /data/dgiot/dgiot_pg_writer/data
User=postgres
Group=postgres
Environment=DATA_DIR=/data/dgiot/dgiot_pg_writer/data
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,24 @@
[Unit]
Description=dgiot_redis server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/sbin/redis/redis-server /usr/sbin/redis/redis.conf
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,24 @@
[Unit]
Description=dgiot_tdengine_mqtt server
After=network-online.target
Wants=network-online.target
[Service]
Type=forking
ExecStart=/usr/sbin/dgiot_tdengine_mqtt 173.173.0.20
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,26 @@
[Unit]
Description=gofastdfs server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/data/dgiot/go_fastdfs/file /data/dgiot/go_fastdfs
WorkingDirectory=/data/dgiot/go_fastdfs
Environment=GO_FASTDFS_DIR=/data/dgiot/go_fastdfs
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,27 @@
[Unit]
Description=dgiot server
After=network-online.target
Wants=network-online.target
[Service]
Type=forking
ExecStart=/bin/sh /data/dgiot/dgiot/bin/emqx start
User=root
Group=root
Environment=HOME=/data/dgiot/dgiot/erts-11.0
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=300
OOMScoreAdjust=-1000
TimeoutStopSec=1000000s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target