🌛 First commit

This commit is contained in:
2025-12-29 17:55:42 -05:00
parent 87bad9b704
commit b4bce043d9
20 changed files with 852 additions and 0 deletions

68
stacks/outline/README.md Normal file
View File

@@ -0,0 +1,68 @@
# Outline Stack
Outline Wiki with Postgres and Redis.
## Services
| Service | Port | Description |
|---------|------|-------------|
| outline | 3000:3000 | Wiki application |
| outline-postgres | - | PostgreSQL database |
| outline-redis | - | Redis cache |
## Configuration Files
Copy `redis.conf` to `/mnt/user/appdata/outline/` before deploying.
## Dependencies
- S3 bucket for uploads: `outline-wiki-data-bucket`
- Slack app for authentication: https://api.slack.com/apps/A041B5BSXD2
## NGINX Proxy Manager
Create HTTPS proxy for `wiki.rishighan.com` pointing to `192.168.1.75:3000`
## Migration from VM
1. Create directories:
```bash
mkdir -p /mnt/user/appdata/outline/{postgres-data,redis}
cp redis.conf /mnt/user/appdata/outline/
```
2. Export Postgres from VM:
```bash
ssh rishi@192.168.1.112
docker exec outline-postgres-1 pg_dump -U rishi outline > ~/outline_backup.sql
```
3. Copy backup to Flook:
```bash
scp rishi@192.168.1.112:~/outline_backup.sql /mnt/user/appdata/outline/
```
4. Deploy stack via Portainer (creates empty DB)
5. Stop outline temporarily:
```bash
docker stop outline
```
6. Import data:
```bash
docker exec -i outline-postgres psql -U rishi outline < /mnt/user/appdata/outline/outline_backup.sql
```
7. Start outline:
```bash
docker start outline
```
8. Update NPM proxy to point to 192.168.1.75:3000
9. Stop VM services after verification:
```bash
ssh rishi@192.168.1.112
cd ~/outline && docker compose down
```

View File

@@ -0,0 +1,31 @@
services:
outline:
image: outlinewiki/outline:latest
container_name: outline
restart: unless-stopped
command: sh -c "yarn db:migrate --env=production-ssl-disabled && yarn start --env=production-ssl-disabled"
ports:
- 3000:3000
env_file:
- stack.env
depends_on:
- outline-redis
- outline-postgres
outline-redis:
image: redis:latest
container_name: outline-redis
restart: unless-stopped
volumes:
- /mnt/user/appdata/outline/redis.conf:/redis.conf
- /mnt/user/appdata/outline/redis:/data
command: ["redis-server", "/redis.conf"]
outline-postgres:
image: postgres:15
container_name: outline-postgres
restart: unless-stopped
env_file:
- stack.env
volumes:
- /mnt/user/appdata/outline/postgres-data:/var/lib/postgresql/data

View File

@@ -0,0 +1,2 @@
bind 0.0.0.0
port 6379

31
stacks/outline/stack.env Normal file
View File

@@ -0,0 +1,31 @@
# REQUIRED
SECRET_KEY=ce86b161b3e7e8ce75136060afd462673363b1b0d027aff8a2bfc097b20bb39a
UTILS_SECRET=a9e89560aad956988f53949ab354dbff63bd5c75e08e560b2cbfcee71d2fae30
POSTGRES_USER=rishi
POSTGRES_PASSWORD=dexter
POSTGRES_DB=outline
DATABASE_URL=postgres://rishi:dexter@outline-postgres:5432/outline
DATABASE_URL_TEST=postgres://rishi:dexter@outline-postgres:5432/outline-test
PGSSLMODE=disable
REDIS_URL=redis://outline-redis:6379
URL=https://wiki.rishighan.com
PORT=3000
AWS_ACCESS_KEY_ID=AKIAQP5UUFQPKWAILLJK
AWS_SECRET_ACCESS_KEY=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
AWS_REGION=us-east-1
AWS_S3_UPLOAD_BUCKET_URL=https://outline-wiki-data-bucket.s3.us-east-1.amazonaws.com
AWS_S3_UPLOAD_BUCKET_NAME=outline-wiki-data-bucket
AWS_S3_UPLOAD_MAX_SIZE=26214400
AWS_S3_FORCE_PATH_STYLE=false
# AUTHENTICATION
SLACK_KEY=11934097441.4045181915444
SLACK_SECRET=740d1d0b375d7609cd1fa18de2b1e8d4
# OPTIONAL
SLACK_VERIFICATION_TOKEN=StwRrYvcGHCDME4a5x2jU9zq
SLACK_APP_ID=A041B5BSXD2
SLACK_MESSAGE_ACTIONS=true
FORCE_HTTPS=false
ENABLE_UPDATES=true
WEB_CONCURRENCY=2