vanegmondgroep/sip-stack

There is no license information available for the latest version (v1.0.0) of this package.

Stack configuration for the Smart Industry Platform.

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:Shell

Type:project

v1.0.0 2021-12-07 10:01 UTC

This package is auto-updated.

Last update: 2024-04-09 15:50:01 UTC


README

Stack configuration for the Smart Industry Platform.

Requirements

  • Ubuntu 20.04
  • Composer
  • Docker
  • Docker Compose

Installation

  • Authenticate to the GitHub container registry with your username and a personal access token as password (permissions: read:packages):
docker login ghcr.io
  • Create a new SIP Stack project (replace <client> and <project>):
composer create-project vanegmondgroep/sip-stack sip-<client>-<project>
  • Run the following commands to initialize the stack:
# Start containers
./sip up -d

# Migrate the database
./sip artisan migrate --seed

# Generate application key
./sip artisan key:generate
  • Navigate to http://<ip-address>/register and register a new user.

Configuration

Backups

Add the following line to the .env file if you would like to move backups to another location (for example a network share):

BACKUPS_PATH=/mnt/share/Backups

Exports

Modify ./config/export.flux to change the InfluxDB export query and add the following line to the .env file if you would like to move exports to another location (for example a network share):

EXPORTS_PATH=/mnt/share/Exports

Cleanup

Add the following line to the .env file to automatically cleanup backups and exports after x days:

CLEANUP_DAYS=30

Cronjobs

Configure a cronjob to automatically export or backup data:

  • Open crontab:
crontab -e
  • Add the following lines (replace <path-to-sip>):
# Export data
0 0 * * * <path-to-sip>/sip export > ~/sip-export.log 2>&1

# Backup data
0 1 * * * <path-to-sip>/sip backup > ~/sip-backup.log 2>&1

Commands

# Start containers
./sip up -d

# Stop containers
./sip down

# Start container shell
./sip bash

# Backup container data
./sip backup

# Export log data
./sip export