|Forest Belton e9d8383d02 Create git repository if it does not exist||10 months ago|
|js||10 months ago|
|migrations||10 months ago|
|scripts||10 months ago|
|src||10 months ago|
|.dockerignore||10 months ago|
|.env||10 months ago|
|.gitattributes||10 months ago|
|.gitignore||10 months ago|
|Cargo.lock||10 months ago|
|Cargo.toml||10 months ago|
|Dockerfile||10 months ago|
|LICENSE||10 months ago|
|README.md||10 months ago|
|diesel.toml||10 months ago|
|docker-compose.yml||10 months ago|
Oxidoc is a wiki service designed for simplicity and ease of use. The service consists of several components:
Keeping track of the wiki data within a git repository has several benefits, but mainly it is due to concurrency. By using git, there is no need to worry about atomicity when updating an article, and failed merges produce output that can be easily consumed by the API.
Postgres exists to keep track of data not stored within the articles themselves. This includes creation & edit times, user information, and other related fields.
Oxidoc can be deployed in two ways: either through using a collection of Docker containers or by a more manual approach. While this section outlines both methods, it is preferable to use Docker due to the simplicity of this approach.
First, make sure you have Docker installed. Then run the following commands from the project directory:
$ docker-compose build $ docker-compose up
Once these commands complete, the service should be fully operational and listening for new HTTP connections on the default port (60000).
Manual builds require two steps: one for the frontend and one for the API. If you are deploying the
service manually, make sure you have a Postgres instance configured to accept connections and have
DATABASE_URL configuration value.
Make sure you have a recent copy of Node.js installed. If you don’t have Node.js, install nvm and install the latest stable version. Then, to build the project:
$ npm install $ npm run build
By default, the API will serve static files from
js/public, so nothing else needs to be done.
Make sure you have a recent copy of Rust installed. If you don’t have Rust, install rustup and install the latest stable version. Then, to build the project:
$ cargo build
After the project is successfully built, the API can be started via:
$ cargo run
Since Oxidoc is a twelve-factor app, configuration occurs mainly through environment variables. The following table represents all of the available options along with a brief description of their meaning:
|IFACE||The network interface to listen for connections on|
|PORT||The network port to listen on|
|DATABASE_URL||A Diesel-compatible URL that refers to the Postgres database|
|REPOSITORY_DIR||The location of the backing Git repository|
These values can also be updated in the
.env file rather than passed through the environment. An
environment variable will always take precedence over the value defined in