Provide a container orchestrated means to deploy the [GitWriter] along with the connector to [GitHub] and validation tool and named entity recognizer [NERVE].
The goal of this repo is to provides an easy-to-deploy instance of CWRC-Writer, including components, while only modifying a limited number of config files.
- Docker & Docker Compose
The basics, clone this repository, modify the config files, and run docker-compose to pull the DockerHub images and deploy GitWriter. There are two approaches available
- nginx reverse proxy: requried IP for the config files; instructions
- or Traefik reverse proxy & Let's Encrypt: required server DNS entry (following)
By default, docker-compose.yml
and traefik.yml
setup ports 80
and 443
Remove the .example
extension.
container_volumes/traefik/traefik.yml
: set e-mail for Let's Encrypt (Step 3)container_volumes/traefik/conf/*
: set the host name (Step 4)container_volumes/cwrc-gitserver/config/config.json.example
: set the GitHub integration (Step 5-6)container_volumes/cwrc-gitwriter/config/config.json.example
: set the host for nerve and validator service (Step 7)
- traefik.yml:
email: "[email protected]"
- traefik-api.yml:
rule: Host(`YOUR.DOMAIN`)
and"USER:PASSWORD"
. Usehtpasswd
to create an ecrypted password. (e.g.,htpasswd -nb admin secure_password
) - common.yml:
rule: Host(`YOUR.DOMAIN`)
- gitserver.yml:
rule: Host(`YOUR.DOMAIN`)
- gitwriter.yml:
rule: Host(`YOUR.DOMAIN`)
- nerve.yml:
rule: Host(`YOUR.DOMAIN`)
- validator.yml:
rule: Host(`YOUR.DOMAIN`)
Homepage URL
, usehttps://${your_host_from_above}/
,Authorization callback URL
, usehttps://${your_host_from_above}/github/callback
- Record
Client ID
and theClient Secret
for the next step
Details https://github.com/cwrc/CWRC-GitServer#config
On cwrc-gitserver/config/config.json:
- Update
Client ID
and theClient Secret
from above - Update
jwt_secret
with a randomly generated string of characters - Update
github_client_origin
,github_oath_callback
andgithub_oath_callback
with the server host name
CWRC-GitWriter comes with basic configurations. Relevant information for a server setup is the following:
On cwrc-gitwriter/config/config.json:
nerveUrl: 'https://YOUR.DOMAIN/nerve/'
,validationUrl: 'https://YOUR.DOMAIN/validator/validate.html'
Also, provide a username to access GeoNames' service:
lookups: { geonames: { username": "YOUR.USERNAME"} }
Note that if a username is not provided, CWRC-Git-Writer will throw an error when trying to access GeoNames. You can create a free user account here account: https://www.geonames.org/login
See more about the config file here: https://github.com/cwrc/CWRC-GitWriter/blob/master/README.md
https://${your_host_from_above}/
will be the site URL of CWRC-Writerdocker-compose up -d
will launch the containersdocker-compose logs -f
will follow the logs produced by the containersdocker-compose pull
will pull new images from DockerHubdocker-compose down
will stop the containers
To access Trafeik Dashboard, navigate to the URL you set up on traefik-api.yml (e.g., https://YOUR.DOMAIN/dashboard/
).
Use the user and password you set up.