-
Notifications
You must be signed in to change notification settings - Fork 0
Add VPS deployment support with Caddy reverse proxy #483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| {$MW_SERVER} { | ||
malberts marked this conversation as resolved.
Show resolved
Hide resolved
malberts marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| reverse_proxy mediawiki:80 | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # NeoWiki Docker Deployment | ||
|
|
||
| Deploy NeoWiki on a VPS with automatic HTTPS via Caddy. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Docker and Docker Compose installed on your VPS | ||
| - A domain name pointing to your VPS | ||
| - Ports 80 and 443 open | ||
|
|
||
| ## Setup | ||
|
|
||
| 1. Copy this directory to your VPS | ||
|
|
||
| 2. Edit `.env` and change all values marked with `# Change for production`: | ||
| - `MW_SERVER` - your wiki's URL (e.g., `https://wiki.example.com`) | ||
malberts marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `MARIADB_ROOT_PASSWORD` - database root password | ||
| - `MARIADB_PASSWORD` - database user password | ||
| - `MW_ADMIN_PASSWORD` - MediaWiki admin password | ||
| - `NEO4J_PASSWORD` - Neo4j password | ||
| - `NEO4J_PASSWORD_READ` - Neo4j read-only user password | ||
|
|
||
| 3. Start the containers: | ||
| ```bash | ||
| docker compose up -d | ||
| ``` | ||
|
|
||
| 4. Wait for containers to be healthy, then initialize the database: | ||
| ```bash | ||
| make install-db | ||
| make load-neo4j-users | ||
| ``` | ||
|
|
||
| 5. Optionally load NeoWiki demo data: | ||
| ```bash | ||
| make import-demo-data | ||
| ``` | ||
|
|
||
| 6. Access your wiki at your configured `MW_SERVER` URL | ||
|
|
||
| ## Extra | ||
|
|
||
| Server hardening is not covered here. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| services: | ||
| mediawiki: | ||
| image: ghcr.io/professionalwiki/neowiki:latest | ||
| ports: | ||
| - "127.0.0.1:${MW_SERVER_PORT}:80" | ||
| - "127.0.0.1:8486:8486" | ||
| depends_on: | ||
| - db | ||
| - neo | ||
| environment: | ||
| - MARIADB_DATABASE | ||
| - MARIADB_USER | ||
| - MARIADB_PASSWORD | ||
| - MW_SERVER | ||
| - NEO4J_URL_EXTERNAL | ||
| - NEO4J_USERNAME | ||
| - NEO4J_PASSWORD | ||
| - NEO4J_USERNAME_READ | ||
| - NEO4J_PASSWORD_READ | ||
| healthcheck: | ||
| test: "curl -fsSL http://localhost:80/index.php/Special:Version | grep 'Jeroen De Dauw'" | ||
| interval: 60s | ||
| timeout: 5s | ||
| retries: 1 | ||
|
|
||
| db: | ||
| image: mariadb:11.8 | ||
| environment: | ||
| - MARIADB_ROOT_PASSWORD | ||
| - MARIADB_DATABASE | ||
| - MARIADB_USER | ||
| - MARIADB_PASSWORD | ||
| healthcheck: | ||
| test: ["CMD", "mariadb-admin" ,"ping", "-h", "localhost"] | ||
| interval: 10s | ||
| timeout: 10s | ||
| retries: 4 | ||
|
|
||
| neo: | ||
| image: neo4j:enterprise | ||
| ports: | ||
| - "127.0.0.1:7474:7474" | ||
| - "127.0.0.1:7687:7687" | ||
| environment: | ||
| - NEO4J_ACCEPT_LICENSE_AGREEMENT=eval | ||
| - NEO4J_AUTH | ||
| healthcheck: | ||
| test: "wget http://localhost:7474/browser -O - | grep 'Neo4j Browser'" | ||
| interval: 5s | ||
| timeout: 1s | ||
| retries: 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.