Browse Source

scirius

135-scirius
Steven Foerster 5 years ago
parent
commit
45ee4c7150
  1. 6
      extra/scirius.yml
  2. 8
      scripts/services/Mistborn-scirius.service
  3. 0
      scripts/services/scirius/init.sh
  4. 2
      scripts/subinstallers/extra/scirius.sh

6
extra/scirius.yml

@ -7,7 +7,7 @@ services:
#environment: #environment:
# - SECRET_KEY: <SECRET KEY> # - SECRET_KEY: <SECRET KEY>
env_file: env_file:
- ../.envs/.production/.suricata - ../.envs/.production/.scirius
volumes: volumes:
- ../../mistborn_volumes/extra/scirius/data:/data - ../../mistborn_volumes/extra/scirius/data:/data
- ../../mistborn_volumes/extra/scirius/logs:/logs - ../../mistborn_volumes/extra/scirius/logs:/logs
@ -16,10 +16,10 @@ services:
- /var/run/suricata-command.socket:/var/run/suricata-command.socket - /var/run/suricata-command.socket:/var/run/suricata-command.socket
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.scirius-http.rule=Host(`suricata.mistborn`)" - "traefik.http.routers.scirius-http.rule=Host(`scirius.mistborn`)"
- "traefik.http.routers.scirius-http.entrypoints=web" - "traefik.http.routers.scirius-http.entrypoints=web"
- "traefik.http.routers.scirius-http.middlewares=mistborn_auth@file" - "traefik.http.routers.scirius-http.middlewares=mistborn_auth@file"
- "traefik.http.routers.scirius-https.rule=Host(`suricata.mistborn`)" - "traefik.http.routers.scirius-https.rule=Host(`scirius.mistborn`)"
- "traefik.http.routers.scirius-https.entrypoints=websecure" - "traefik.http.routers.scirius-https.entrypoints=websecure"
- "traefik.http.routers.scirius-https.middlewares=mistborn_auth@file" - "traefik.http.routers.scirius-https.middlewares=mistborn_auth@file"
- "traefik.http.routers.scirius-https.tls.certresolver=basic" - "traefik.http.routers.scirius-https.tls.certresolver=basic"

8
scripts/services/Mistborn-suricata.service → scripts/services/Mistborn-scirius.service

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Mistborn Suricata Description=Mistborn Scirius Service
Requires=Mistborn-base.service Requires=Mistborn-base.service
After=Mistborn-base.service After=Mistborn-base.service
PartOf=Mistborn-base.service PartOf=Mistborn-base.service
@ -11,12 +11,12 @@ User=root
Group=docker Group=docker
PermissionsStartOnly=true PermissionsStartOnly=true
# Shutdown container (if running) when unit is stopped # Shutdown container (if running) when unit is stopped
ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh suricata docker-compose -f /opt/mistborn/extra/scirius.yml down ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh scirius docker-compose -f /opt/mistborn/extra/scirius.yml down
# Start container when unit is started # Start container when unit is started
ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh suricata docker-compose -f /opt/mistborn/extra/scirius.yml up --build ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh scirius docker-compose -f /opt/mistborn/extra/scirius.yml up --build
# Stop container when unit is stopped # Stop container when unit is stopped
ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh suricata docker-compose -f /opt/mistborn/extra/scirius.yml down ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh scirius docker-compose -f /opt/mistborn/extra/scirius.yml down
# Post stop # Post stop
[Install] [Install]

0
scripts/services/suricata/init.sh → scripts/services/scirius/init.sh

2
scripts/subinstallers/extra/suricata.sh → scripts/subinstallers/extra/scirius.sh

@ -4,6 +4,6 @@
SCIRIUS_PROD_FILE="$1" SCIRIUS_PROD_FILE="$1"
SCIRIUS_SECRET_KEY=$(python3 -c "import secrets; import string; print(f''.join([secrets.choice(string.ascii_letters+string.digits) for x in range(50)]))") SCIRIUS_SECRET_KEY=$(python3 -c "import secrets; import string; print(f''.join([secrets.choice(string.ascii_letters+string.digits) for x in range(50)]))")
echo "SECRET_KEY=$SCIRIUS_SECRET_KEY" > $SCIRIUS_PROD_FILE echo "SECRET_KEY=$SCIRIUS_SECRET_KEY" > $SCIRIUS_PROD_FILE
echo "ALLOWED_HOSTS=suricata.mistborn" >> $SCIRIUS_PROD_FILE echo "ALLOWED_HOSTS=scirius.mistborn" >> $SCIRIUS_PROD_FILE
echo "DJANGO_SUPERUSER_USERNAME=mistborn" >> $SCIRIUS_PROD_FILE echo "DJANGO_SUPERUSER_USERNAME=mistborn" >> $SCIRIUS_PROD_FILE
echo "DJANGO_SUPERUSER_EMAIL=mistborn@email.mistborn" >> $SCIRIUS_PROD_FILE echo "DJANGO_SUPERUSER_EMAIL=mistborn@email.mistborn" >> $SCIRIUS_PROD_FILE
Loading…
Cancel
Save