Added outline stack
This commit is contained in:
@@ -1,68 +1,29 @@
|
||||
# Outline Stack
|
||||
# Outline Wiki
|
||||
|
||||
Outline Wiki with Postgres and Redis.
|
||||
Knowledge base and wiki.
|
||||
|
||||
## Services
|
||||
## Deployment
|
||||
|
||||
| Service | Port | Description |
|
||||
|---------|------|-------------|
|
||||
| outline | 3000:3000 | Wiki application |
|
||||
| outline-postgres | - | PostgreSQL database |
|
||||
| outline-redis | - | Redis cache |
|
||||
Deploy via Portainer git stack or:
|
||||
|
||||
## 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/
|
||||
cd /mnt/user/data/flook-stacks/stacks/outline
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
2. Export Postgres from VM:
|
||||
## Restore Database
|
||||
|
||||
After first deploy, restore the database:
|
||||
|
||||
```bash
|
||||
ssh rishi@192.168.1.112
|
||||
docker exec outline-postgres-1 pg_dump -U rishi outline > ~/outline_backup.sql
|
||||
docker exec -i outline-postgres psql -U rishi outline < /mnt/user/appdata/outline/outline-backup.sql
|
||||
```
|
||||
|
||||
3. Copy backup to Flook:
|
||||
```bash
|
||||
scp rishi@192.168.1.112:~/outline_backup.sql /mnt/user/appdata/outline/
|
||||
```
|
||||
## Volumes
|
||||
|
||||
4. Deploy stack via Portainer (creates empty DB)
|
||||
- `/mnt/user/appdata/outline/db-data` - PostgreSQL data
|
||||
- `/mnt/user/appdata/outline/redis-data` - Redis data
|
||||
|
||||
5. Stop outline temporarily:
|
||||
```bash
|
||||
docker stop outline
|
||||
```
|
||||
## NPM Proxy
|
||||
|
||||
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
|
||||
```
|
||||
- `wiki.rishighan.com` → `192.168.1.75:3000`
|
||||
|
||||
@@ -1,31 +1,43 @@
|
||||
networks:
|
||||
outline-net:
|
||||
name: outline-net
|
||||
driver: bridge
|
||||
|
||||
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"
|
||||
env_file: ./stack.env
|
||||
ports:
|
||||
- 3000:3000
|
||||
env_file:
|
||||
- stack.env
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- outline-redis
|
||||
- outline-postgres
|
||||
- postgres
|
||||
- redis
|
||||
networks:
|
||||
- outline-net
|
||||
|
||||
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:
|
||||
postgres:
|
||||
image: postgres:15
|
||||
container_name: outline-postgres
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- stack.env
|
||||
environment:
|
||||
- POSTGRES_USER=rishi
|
||||
- POSTGRES_PASSWORD=dexter
|
||||
- POSTGRES_DB=outline
|
||||
volumes:
|
||||
- /mnt/user/appdata/outline/postgres-data:/var/lib/postgresql/data
|
||||
- /mnt/user/appdata/outline/db-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- outline-net
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
container_name: outline-redis
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /mnt/user/appdata/outline/redis-data:/data
|
||||
- /mnt/user/appdata/outline/redis.conf:/redis.conf
|
||||
command: ["redis-server", "/redis.conf"]
|
||||
networks:
|
||||
- outline-net
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
# –––––––––––––––– 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
|
||||
DATABASE_URL=postgres://rishi:dexter@postgres:5432/outline
|
||||
DATABASE_URL_TEST=postgres://rishi:dexter@postgres:5432/outline-test
|
||||
PGSSLMODE=disable
|
||||
REDIS_URL=redis://outline-redis:6379
|
||||
REDIS_URL=redis://redis:6379
|
||||
URL=https://wiki.rishighan.com
|
||||
PORT=3000
|
||||
AWS_ACCESS_KEY_ID=AKIAQP5UUFQPKWAILLJK
|
||||
@@ -17,12 +16,9 @@ AWS_S3_UPLOAD_BUCKET_URL=https://outline-wiki-data-bucket.s3.us-east-1.amazonaws
|
||||
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 ––––––––––––––––
|
||||
GOOGLE_ANALYTICS_ID=UA-XXXXXXX-1
|
||||
SLACK_VERIFICATION_TOKEN=StwRrYvcGHCDME4a5x2jU9zq
|
||||
SLACK_APP_ID=A041B5BSXD2
|
||||
SLACK_MESSAGE_ACTIONS=true
|
||||
|
||||
Reference in New Issue
Block a user