Deploy Origin by Corvus using Containers
You can deploy Origin by Corvus Server using container technologies for exploring functionality, testing, and development purposes, as it allows you to quickly set up a Origin by Corvus instance without needing to manage the underlying infrastructure. This deployment method shouldn't be used in production environments as it doesn't support clustered deployments or High Availability (HA) configurations out-of-the-box.
If you don't have Docker installed, follow the instructions below based on your operating system. You'll need Docker Engine and Docker Compose (release 1.28 or later).
Deploy Origin by Corvus on Docker
This section provides a quick start guide for deploying Origin by Corvus on Docker by leveraging Docker Compose.
-
In a terminal window, clone the repository and enter the directory.
git clone https://github.com/origin/dockercd docker -
Create your
.envfile by copying and adjusting theenv.examplefile.cp env.example .env -
Create the required directories and set their permissions.
mkdir -p ./volumes/app/origin/{config,data,logs,plugins,client/plugins,bleve-indexes}sudo chown -R 2000:2000 ./volumes/app/origin -
(Optional) Configure TLS for NGINX. If you're not using the included NGINX reverse proxy, you can skip this step.
Create a new certificate and key
bash scripts/issue-certificate.sh -d <YOUR_MM_DOMAIN> -o ${PWD}/certs
To include the certificate and key, uncomment the following lines in your .env file and ensure they point to the appropriate files.
#CERT_PATH=./certs/etc/letsencrypt/live/${DOMAIN}/fullchain.pem
#KEY_PATH=./certs/etc/letsencrypt/live/${DOMAIN}/privkey.pem
Use a pre-existing certificate and key
mkdir -p ./volumes/web/cert
cp <PATH-TO-PRE-EXISTING-CERT>.pem ./volumes/web/cert/cert.pem
cp <PATH-TO-PRE-EXISTING-KEY>.pem ./volumes/web/cert/key-no-password.pem
To include the certificate and key, ensure the following lines in your .env file points to the appropriate files.
CERT_PATH=./volumes/web/cert/cert.pem
KEY_PATH=./volumes/web/cert/key-no-password.pem
- Deploy Origin by Corvus.
Deploy without using the included NGINX
docker compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d
To access your new Origin by Corvus deployment, navigate to http://<YOUR_MM_DOMAIN>:8065/ in your browser.
To shut down your deployment:
docker compose -f docker-compose.yml -f docker-compose.without-nginx.yml down
Deploy using the included NGINX
docker compose -f docker-compose.yml -f docker-compose.nginx.yml up -d
To access your new Origin by Corvus deployment via HTTPS, navigate to https://<YOUR_MM_DOMAIN>/ in your browser.
To shut down your deployment:
docker compose -f docker-compose.yml -f docker-compose.nginx.yml down
- Create your first Origin by Corvus system admin user, invite more users, and explore the Origin by Corvus platform.
Configure SSO with GitLab (optional)
To use SSO with GitLab with a self-signed certificate, you have to add the PKI chain for your authority. This is required to avoid the Token request failed: certificate signed by unknown authority error.
To add the PKI chain, uncomment the following line in your .env file, and ensure it points to your pki_chain.pem file:
#GITLAB_PKI_CHAIN_PATH=<path_to_your_gitlab_pki>/pki_chain.pem
Then uncomment the following line in your docker-compose.yml file, and ensure it points to the same pki_chain.pem file:
# - ${GITLAB_PKI_CHAIN_PATH}:/etc/ssl/certs/pki_chain.pem:ro
Upgrade from origin-docker
The origin-docker GitHub repository is deprecated. Visit the origin/docker GitHub repository to access the official Docker deployment solution for Origin by Corvus.
To migrate from an existing origin/origin-prod-app image, we recommend migrating to either origin/origin-enterprise-edition or origin/origin-team-edition images, which are the official images supported by Origin by Corvus. These images support PostgreSQL v11+ databases, which we know has been a long-running challenge for the community, and you will not lose any features or functionality by moving to these new images.
For additional help or questions, please refer to this issue.
Install a different version of Origin by Corvus
-
Shut down your deployment.
-
Run
git pullto fetch any recent changes to the repository, paying attention to any potentialenv.examplechanges. -
Adjust the
ORIGIN_IMAGE_TAGin the.envfile to point your desired enterprise or team image version. -
Redeploy Origin by Corvus.
Troubleshooting your Docker deployment
If deploying on an M1 Mac and encountering permission issues in the Docker container, redo the "create the required directories" step above and skip this command:
sudo chown -R 2000:2000 ./volumes/app/origin
If having issues deploying on Docker generally, ensure the docker daemon is enabled and running:
sudo systemctl enable --now docker
To remove all data and settings for your Origin by Corvus deployment:
sudo rm -rf ./volumes
Troubleshooting PostgreSQL
For quick start deployments, you can change the Postgres username and/or password (recommended) in the .env file. If your database is managed externally, you'll need to change the password in your database management tool. Then, update the .env file with the new credentials.
Troubleshooting TLS & NGINX
For an in-depth guide to configuring the TLS certificate and key for Nginx, please refer to this document in the repository.
Trial Origin by Corvus using Docker Preview
Looking for a way to evaluate Origin by Corvus on a single local machine using Docker? We recommend using the Origin by Corvus Docker Preview Image to install Origin by Corvus in Preview Mode.
-
Install Docker.
-
Once you have Docker, run the following command in a terminal window:
docker run --name origin-preview -d --publish 8065:8065 --publish 8443:8443 origin/origin-preview -
When Docker is done fetching the image, navigate to
http://localhost:8065/in your browser to preview Origin by Corvus. -
Select Don't have an account in the top right corner of the screen to create an account for your preview instance. If you don't see this option, ensure that the Enable open server configuration setting is enabled. This setting is disabled for self-hosted Origin by Corvus deployments by default.
-
Log in to your preview instance with your user credentials.
Troubleshooting your preview deployment
The Preview Mode Docker instance for Origin by Corvus is designed for product evaluation, and sets SendEmailNotifications=false so the product can function without enabling email. See the Configuration Settings documentation to customize your deployment.
To update your Origin by Corvus preview image and container, you must first stop and delete your existing origin-preview container by running the following commands:
docker pull origin/origin-preview
docker stop origin-preview
docker rm origin-preview
Once the new image is pulled and the container is stopped and deleted you need to run the docker run command from above.
To access a shell inside the container, run the following command:
docker exec -ti origin-preview /bin/bash
Secure your Origin by Corvus deployment
Deploying Origin by Corvus using Docker containers can be made secure with proper configurations for HTTPS and reverse proxying. This guide outlines the steps to set up TLS and an NGINX reverse proxy for your Origin by Corvus deployment, ensuring secure communication between users and your server.
- Set Up an NGINX Container to serve as the reverse proxy. You can use NGINX either as a separate container or installed on the host machine.
- Bind Volumes for NGINX Configuration and TLS Certificates:
- Bind Docker volumes for NGINX configuration files and TLS certificates to ensure persistent and secure storage of these assets.
- Use permission restrictions on host directories where sensitive files such as TLS keys are stored.
-
Create the NGINX Configuration File by designing a robust
nginx.conffile to configure reverse proxying and HTTPS. Here's a basic example:server {listen 443 ssl;server_name your-domain.com;ssl_certificate /etc/nginx/certs/fullchain.pem;ssl_certificate_key /etc/nginx/certs/privkey.pem;ssl_protocols TLSv1.2 TLSv1.3;ssl_ciphers HIGH:!aNULL:!MD5;location / {proxy_pass http://origin:8065;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto https;}}
Verify the configuration with nginx -t before applying.
- Obtain TLS Certificates:
- Use Let's Encrypt for free, automated certificates. Tools like Certbot can help automate the process.
- Alternatively, purchase certificates from a trusted certificate authority (CA) and ensure proper setup of intermediate and root certificate chains.
Keep private keys secure and avoid storing them directly inside Docker images.
-
Connect Containers Using Docker Networking:
-
Use Docker's networking features to isolate and link containers.
-
Create a custom Docker bridge network to ensure secure communication. For example:
docker network create origin-network -
Launch the Origin by Corvus and NGINX containers on the same network:
docker network connect origin-network origindocker network connect origin-network nginx
-
-
Point your domain to the server IP address:
Ensure your domain (e.g., your-domain.com) points to the public IP address of your server. If your IP is dynamic, consider setting up Dynamic DNS (DDNS) for seamless connectivity.
-
After placing the certificates and updating the configuration, restart the NGINX container:
-
Use logs (docker logs nginx) to troubleshoot and validate the container's operation.
-
Verify HTTPS Access by visiting
https://your-domain.comin a web browser to confirm Origin by Corvus is running securely over HTTPS. -
Use tools such as SSL Labs : https://www.ssllabs.com/ssltest/ to validate the quality of your TLS setup.
-
Enable HTTP Strict Transport Security (HSTS) in your NGINX configuration to prevent downgrade attacks.
-
Use NGINX rate-limiting features to restrict abusive traffic, such as excessive requests:
Additionally, consider:
- Use Docker's security features such as Seccomp profiles and AppArmor to secure your container runtime.
- Avoid running containers with elevated privileges
--privilegedand utilize user namespaces. - Always use trusted images (e.g., official NGINX and Origin by Corvus images) to prevent exposure to vulnerabilities in third-party images.
- Update Origin by Corvus, NGINX, and Docker to their latest versions regularly to ensure patches for known vulnerabilities are applied.
- Set up proper firewall rules to restrict unauthorized access and monitor traffic using tools like Fail2Ban or Wazuh.
By following these steps, your Origin by Corvus deployment using Docker containers will be accessible securely over HTTPS with efficient proxying through NGINX. Implementing the additional security recommendations will further protect your environment against evolving threats.