Merge branch 'master' into master

pull/126/head
Josh Moore 2 years ago committed by GitHub
commit cdb530de37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
.github/README.md vendored

@ -162,19 +162,10 @@ npm run setup && docker-compose restart
Easy! Just pull the changes & run this one-liner:
```bash
# Pull the latest version of ass
git pull
# Rebuild the container with the new changes (uncomment the 2nd part if the update requires refreshing the config)
docker-compose up --force-recreate --build -d && docker image prune -f # && docker-compose exec ass npm run setup && docker-compose restart
# Pull the latest version of ass and rebuild the image
git pull && docker compose build --no-cache && docker compose up -d
```
- `--force-recreate` will force the container to rebuild
- `--build` will build the image from the latest changes in the directory
- `-d` will run the container in the background
- `docker image prune -f` will remove old images that are no longer used by any containers
- *These descriptions were suggested by [CoPilot], feel free to revise if necessary.*
#### What else should I be aware of?
- `docker-compose` exposes **five** volumes. These volumes let you edit the config, view the auth or data files, or view the `uploads/` folder from your host.

@ -1,12 +1,15 @@
# ass Docker compose.yaml v0.1.2
# ass Docker compose.yaml v0.2.0
# authors:
# - tycrek <t@tycrek.com> (https://tycrek.com/)
# - Zusier <zusier@pm.me> (https://github.com/Zusier)
#
# This file is designed to follow the latest Compose specification, defined here: https://github.com/compose-spec/compose-spec/blob/master/spec.md
# Specific thing(s) to note:
# - The filename, `compose.yaml`: "The default path for a Compose file is compose.yaml (preferred)" (https://github.com/compose-spec/compose-spec/blob/master/spec.md#compose-file)
services:
ass:
build: .
command: npm start
container_name: ass-docker
restart: unless-stopped
user: 1001:1001
@ -25,7 +28,6 @@ services:
source: ./data.json
target: /opt/ass/data.json
tmpfs: /tmp # temp files such as uploads are stored here
working_dir: /opt/ass
tty: true
environment:
- NODE_ENV=production # for production

@ -21,21 +21,15 @@ chown -R 1001:1001 config.json auth.json data.json uploads share
chmod -R 774 config.json data.json uploads share
# Wait for user to confirm
echo "Continuing will run docker-compose. Continue? (Press Ctrl+C to abort)"
echo "Continuing will run docker compose. Continue? (Press Ctrl+C to abort)"
read -n 1 -s -r -p "Press any key to continue..."
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 && \
# Bring up the container and run the setup
docker compose up -d && docker compose exec ass npm run setup && docker compose restart
# Done!
echo "ass-docker for Linux installed!"
echo "Run the following to view commands:"
echo "$ docker-compose logs -f --tail=50 --no-log-prefix ass"
echo "$ docker compose logs -f --tail=50 --no-log-prefix ass"

@ -14,21 +14,15 @@ if not exist "./auth.json" echo. >> "./auth.json"
if not exist "./data.json" echo. >> "./data.json"
REM Wait for user to confirm
ECHO Continuing will run docker-compose. Continue? (Press Ctrl+C to abort)
ECHO Continuing will run docker compose. Continue? (Press Ctrl+C to abort)
PAUSE
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 Bring up the container and run the setup
docker compose up -d && docker compose exec ass npm run setup && docker compose restart
REM Done!
ECHO ass-docker for Windows installed!
ECHO Run the following to view commands:
ECHO > docker-compose logs -f --tail=50 --no-log-prefix ass
ECHO > docker compose logs -f --tail=50 --no-log-prefix ass

@ -15,7 +15,7 @@ import { path, log, getTrueHttp, getTrueDomain } from './utils';
//#region Setup - Run first time setup if using Docker (pseudo-process, setup will be run with docker exec)
import { doSetup } from './setup';
const configPath = path('config.json');
if (!fs.existsSync(configPath)) {
if (!fs.existsSync(configPath) || fs.readFileSync(configPath).toString().length === 0) {
doSetup();
// @ts-ignore
return;

@ -18,7 +18,7 @@ try {
var { useSsl, port, domain, isProxied, diskFilePath, s3bucket, s3endpoint, s3usePathStyle } = require('../config.json'); // skipcq: JS-0239, JS-0102
} catch (ex) {
// @ts-ignore
if (ex.code !== 'MODULE_NOT_FOUND') console.error(ex);
if (ex.code !== 'MODULE_NOT_FOUND' || !ex.toString().includes('Unexpected end')) console.error(ex);
}
export function getTrueHttp() {

Loading…
Cancel
Save