← Knowledge library

IT & integrations

Deploying MANSOQ on DigitalOcean

In this guide, we'll walk you through deploying MANSOQ on DigitalOcean. We'll keep things simple so you can follow along to get your instance up and running. Expect the process to take about an hour, depending on your familiarity with the…

Current source · source documentation · 5 min read

In this guide, we'll walk you through deploying MANSOQ on DigitalOcean. We'll keep things simple so you can follow along to get your instance up and running. Expect the process to take about an hour, depending on your familiarity with the tools.

For an overview of all supported cloud providers and their infrastructure requirements, see the Cloud providers overview.


Prerequisites


What You'll Be Doing


Step 1: Create the Database

1.1 Navigate to Databases

1.2 Create a PostgreSQL Database

1.3 Save Connection Details


Step 2: Set Up Object Storage (Spaces)

2.1 Navigate to Spaces

2.2 Create a New Space

2.3 Generate API Keys


Step 3: Deploy the MANSOQ Backend (BE)

Step 3.1: Deploy Redis

3.1.1 Set Up Redis

3.1.2 Name and Deploy


Step 3.2: Deploy the MANSOQ Backend

3.2.1 Fork and Clone the Repository

3.2.2 Set Up the App

3.2.3 Environment Variables

Add the following as global environment variables:

DJANGO_SETTINGS_MODULE=config.settings.production
DATABASE_URL=<db-url> # Use the connection URL from Step 1.
REDIS_URL=redis://redis:6379
CORS_ALLOWED_ORIGINS=["https://mansoq.example.com","http://localhost:4000","http://127.0.0.1:4000"]
CELERY_BROKER_URL=redis://redis:6379
REDIS_URL=redis://redis:6379
BUCKET_PROVIDER=DIGITAL_OCEAN
BUCKET_REGION=nyc3 # Use the region of your Spaces.
BUCKET_KEY= # Use the Spaces key.
BUCKET_SECRET= # Use the Spaces secret.
BUCKET_HAS_FINE_ACL=true
FILE_UPLOAD_BUCKET=example-space-mansoq # Use the name of your Space.
FILE_UPLOAD_BUCKET_ENDPOINT=https://example-space-mansoq.nyc3.digitaloceanspaces.com
FACILITY_S3_BUCKET=example-space-mansoq # Use the name of your Space.
FACILITY_S3_BUCKET_ENDPOINT=https://example-space-mansoq.nyc3.digitaloceanspaces.com
JWKS_BASE64= # Add your JWKS key. (Refer to the next section to create one.)
DISABLE_COLLECTSTATIC=1
Generate JWKS Key

The JWKS_BASE64 value is generated here. Use the generator below to create a key, then paste the output into the JWKS_BASE64 environment variable above.

<JwksGenerator />

3.2.4 Expose Ports


Step 3.3: Add a Domain for the Backend

3.3.1 Configure Domain


Step 3.4: Set Up Celery Worker and Beat

3.4.1 Celery Worker

3.4.2 Celery Beat


Step 4: Deploy the MANSOQ Frontend (FE)

4.1 Fork the Frontend Repository

4.2 Set Up the App

4.3 Add Domain


Step 5: Secure Database Access

5.1 Restrict Access


Step 6: Configure CORS for Spaces

6.1 Go to Bucket Settings


Final Steps


Conclusion

You've successfully deployed the MANSOQ application on DigitalOcean! With the database, object storage, backend, and frontend configured, your application is ready for use. 🚀

For troubleshooting, feel free to join our Community on Slack at community.mansoq.com. You may also refer to the official DigitalOcean Documentation for any questions about DigitalOcean.

Source evidence

References are pinned to the private MANSOQ source repository. Repository access is required to open these links.