mirror of https://github.com/requarks/wiki
parent
6f042e97cc
commit
1040f868e3
@ -0,0 +1,9 @@
|
||||
# Database
|
||||
POSTGRES_DB=wiki
|
||||
POSTGRES_USER=wikijs
|
||||
POSTGRES_PASSWORD=changeme
|
||||
|
||||
# Connection (leave blank and commented for local, fill in for AWS RDS)
|
||||
#DB_HOST=
|
||||
#DB_PORT=
|
||||
#DB_SSL=false
|
||||
@ -0,0 +1,32 @@
|
||||
# Wiki.js Docker Setup
|
||||
|
||||
## Local Development
|
||||
|
||||
### Prerequisites
|
||||
- Docker Desktop installed and running
|
||||
|
||||
### Steps
|
||||
1. Clone the repo
|
||||
2. Copy the env file: `copy .env.example .env`
|
||||
3. Fill in your values in `.env`
|
||||
4. Run: `docker compose up -d`
|
||||
5. Open: `http://localhost`
|
||||
|
||||
## AWS ECS Deployment
|
||||
|
||||
### Prerequisites
|
||||
- AWS CLI configured
|
||||
- ECR repository created
|
||||
- RDS PostgreSQL instance running
|
||||
|
||||
### Steps
|
||||
1. Build the image: `docker build -t wikijs .`
|
||||
2. Push to ECR: follow AWS ECR push commands
|
||||
3. Update ECS Task Definition with your RDS env vars:
|
||||
- DB_HOST=your-rds-endpoint.amazonaws.com
|
||||
- DB_PORT=5432
|
||||
- DB_USER=wikijs
|
||||
- DB_PASS=yourpassword
|
||||
- DB_NAME=wiki
|
||||
- DB_SSL=true
|
||||
4. Deploy the ECS service
|
||||
@ -0,0 +1,5 @@
|
||||
FROM ghcr.io/requarks/wiki:2
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "server"]
|
||||
@ -0,0 +1,33 @@
|
||||
services:
|
||||
|
||||
db:
|
||||
image: postgres:15-alpine
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
logging:
|
||||
driver: none
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
|
||||
wiki:
|
||||
image: ghcr.io/requarks/wiki:2
|
||||
depends_on:
|
||||
- db
|
||||
init: true
|
||||
environment:
|
||||
DB_TYPE: postgres
|
||||
DB_HOST: ${DB_HOST:-db}
|
||||
DB_PORT: ${DB_PORT:-5432}
|
||||
DB_USER: ${POSTGRES_USER}
|
||||
DB_PASS: ${POSTGRES_PASSWORD}
|
||||
DB_NAME: ${POSTGRES_DB}
|
||||
DB_SSL: ${DB_SSL:-false}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:3000"
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
Loading…
Reference in new issue