From baf3865b648d88c719ff0dd3bdcf2cb1635e7717 Mon Sep 17 00:00:00 2001 From: tycrek Date: Wed, 14 Jul 2021 13:49:13 -0600 Subject: [PATCH] TEST trying something else --- README.md | 10 ++++++++++ install/docker-linux.sh | 32 ++++++++++++++++++++++++++++++++ install/docker-windows.bat | 28 ++++++++++++++++++++++++++++ package.json | 6 +----- 4 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 install/docker-linux.sh create mode 100644 install/docker-windows.bat diff --git a/README.md b/README.md index 04ee42d..8b4b2b6 100755 --- a/README.md +++ b/README.md @@ -289,6 +289,16 @@ You may also install ass using [docker-compose](https://docs.docker.com/compose/ Installation is as follows: +#### New steps, work-in-progress + +1. Clone the ass repo using `git clone https://github.com/tycrek/ass.git && cd ass/` +2. Run the command that corresponds to your OS: + - **Linux**: `./install/docker-linux.sh` + - **Windows**: `install/docker-windows.bat` (from Command Prompt) +3. When prompted for setup, enter your details. + +#### Old steps + ```bash # Step 1: # Create the install directory as root and change ownership to the current user diff --git a/install/docker-linux.sh b/install/docker-linux.sh new file mode 100644 index 0000000..3e3cdc2 --- /dev/null +++ b/install/docker-linux.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +echo "Installing ass-docker for Linux..." + +# Ensure that ./uploads/thumbnails/ exists +mkdir -p ./uploads/thumbnails/ + +# Ensure that ./share/ exists +mkdir -p ./share/ + +# Ensure that files config.json, auth.json, & data.json exist +for value in config.json auth.json data.json +do + if [ ! -f $value ]; then + echo "File $value does not exist. Creating..." + touch $value + fi +done + +echo Running setup... + +# docker-compose up -d +docker-compose up -d + +# Run setup within the container +docker-compose exec ass npm run setup + +# Restart the container when complete +docker-compose restart + +# Open the logs to ensure it is running +docker-compose logs -f --tail=50 --no-log-prefix ass diff --git a/install/docker-windows.bat b/install/docker-windows.bat new file mode 100644 index 0000000..548dc59 --- /dev/null +++ b/install/docker-windows.bat @@ -0,0 +1,28 @@ +@echo off + +ECHO Installing ass-docker for Windows... + +REM Ensure that ./uploads/thumbnails/ exists +if not exist "./uploads/thumbnails/" md "./uploads/thumbnails/" + +REM Ensure that ./share/ exists +if not exist "./share/" md "./share/" + +REM Ensure that files config.json, auth.json, & data.json exist +if not exist "./config.json" echo. >> "./config.json" +if not exist "./auth.json" echo. >> "./auth.json" +if not exist "./data.json" echo. >> "./data.json" + +ECHO Running setup... + +REM docker-compose up -d +docker-compose up -d + +REM Run setup within the container +docker-compose exec ass npm run setup + +REM Restart the container when complete +docker-compose restart + +REM Open the logs to ensure it is running +docker-compose logs -f --tail=50 --no-log-prefix ass diff --git a/package.json b/package.json index fcea2e1..47dc41a 100755 --- a/package.json +++ b/package.json @@ -19,11 +19,7 @@ "prestart": "npm run engine-check", "presetup": "npm run engine-check", "logs": "node ./node_modules/@tycrek/log/socketClient.js", - "docker-compose": "docker-compose up -d && docker-compose exec ass npm run setup && docker-compose restart", - "docker-logs": "docker-compose logs -f --tail=50 --no-log-prefix ass", - "docker-stop": "docker-compose stop", - "docker-start": "docker-compose start", - "docker-restart": "docker-compose restart" + "docker-logs": "docker-compose logs -f --tail=50 --no-log-prefix ass" }, "repository": "github:tycrek/ass", "keywords": [