chore: docker container config

pull/8032/head
4Chronosx 4 weeks ago
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

3
.gitignore vendored

@ -47,3 +47,6 @@ test-results/
# Localization Resources
/server/locales/**/*.yml
# Environment variables
.env

@ -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…
Cancel
Save