|Forest Belton e9d8383d02 Create git repository if it does not exist||1 year ago|
|js||1 year ago|
|migrations||1 year ago|
|scripts||1 year ago|
|src||1 year ago|
|.dockerignore||1 year ago|
|.env||1 year ago|
|.gitattributes||1 year ago|
|.gitignore||1 year ago|
|Cargo.lock||1 year ago|
|Cargo.toml||1 year ago|
|Dockerfile||1 year ago|
|LICENSE||1 year ago|
|README.md||1 year ago|
|diesel.toml||1 year ago|
|docker-compose.yml||1 year 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