This repository houses a collection of code artifacts, including Github actions, Github workflows, and essential docker-compose files. These resources are instrumental in facilitating efficient and automated staging and production deployments.
cd compose
- In the
/redis
folder, create a random password for each redis service (replacePASSWORD
). See/redis/example.*.conf
files for required inputs. - Configure the environments for each service by creating your
.env.*
files. Seeexample.env.*
files for required inputs. - Create replica.key for mongodb:
openssl rand -base64 756 > mongo/replica.key # create replica.key
chmod 400 mongo/replica.key # read-only
sudo chown 999:999 mongo/replica.key # change ownership
- On Github generate a app and get the private key, place it in a file
github/githubapp.private-key.pem
. - Create an origin certificate on Cloudflare. Place both the .pem and .key files in the
/nginx/ssl
(make sure their name is the same as theDOMAIN
in.env.nginx
). - Allocate memswap:
free -h # Check Existing Swap Space
sudo fallocate -l 32G /swapfile # Create a 32GB swap file
sudo chmod 600 /swapfile # Set the correct permissions
sudo mkswap /swapfile # Set up the swap file
sudo swapon /swapfile # Enable the swap file
# Verify Swap Space
swapon --show
free -h
# Persist the Swap File
echo '/swapfile swap swap defaults 0 0' | sudo tee -a /etc/fstab
- Run
docker compose up -d
- Install neo4j-migrations tool
- Create a file
.migrations.properties
under the db folder for neo4j based on.migrations.properties.example
- run the
neo4j-migrations apply
withindb
directory (the directory containing the.migrations.properties
) to run neo4j migrations
- Install mongodb-migrations tool
- Change directory to
db/mongo
- Create a
config.ini
file based on theconfig.ini.example
- run the command
mongodb-migrate
within the directory you are in
cd /nginx/htpasswd/
htpasswd -c .htpasswd username