The premiere event and unit management site for Civil Air Patrol
Current units running the Event Manager suite:
Table Of Contents
Development setup is now much simpler. To get a development environment, open this repository in either Visual Studio Code's dev containers extension or using a GitHub codespaces, wait for the environment to set itself up, and then in a terminal run docker-compose -f docker-compose.dev.yml run --service-ports client_dev_server
. A development web server will spin up with a basic default dataset and an admin user with the credentials testadmin
/testpassword
.
In order to build and run the code for production, you will need Docker and Docker Compose installed. It is highly recommended that Docker BuildKit is used when setting up images. Code should theoretically work on Windows, but is solely tested on Linux.
This program depends on the following to fully function:
Each of these sections will require creating files in the keys folder which have just the access token required. After the server is appropriately configured, you should have the following structure in the keys
folder:
em
At the end of all of these files in ./keys, ensure that there are no newline characters at the end (with the exception of aws_ssl_keys)
Additionally, the following folders are required in the /srv
folder:
Create the files ./keys/db_user
and ./keys/db_password
. Place the text em
in the db_user
file. Create a new database password and place that text in the db_password
file
When creating the MySQL database for the first time using docker-compose [-f docker-compose.dev.yml] up mysql
, docker-compose [-f docker-compose.dev.yml] up main
, or docker-compose up proxy
, check the logs for "Generated root password" and store this root password in keys/mysql_root_password
. Docker compose will complain when initially starting up; just touch the file and make sure it exists and is empty, and replace the file with the generated root password.
./keys/aws_access_key_id
and ./keys/aws_secret_access_key
Only required for setting up SSL keys for HTTPS traffic as opposed to HTTP traffic
./keys/aws_ssl_keys
according to the documentation./keys/google-keys
directory
${accountID}.json
, where accountID is the ID of the account you will be creating later./keys/discord_client_token
file./keys/capwatch_orgid
file, as well as your CAP ID and eServices password in ./keys/capwatch_capid
and ./keys/capwatch_password
, respectivelyCreate a new site using the v2 'I'm not a Robot' reCAPTCHA option
Store the public key in ./packages/client/.env
, under the key REACT_APP_RECAPTCHA_KEY, e.g.
REACT_APP_RECAPTCHA_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
Store the provided secret key in ./keys/recaptcha_secret
, e.g. '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe'
The packages/client/.env
file should also have the following content:
REACT_APP_RECAPTCHA_KEY=your public key here
REACT_APP_VERSION=$npm_package_version
REACT_APP_HOST_NAME=your hostname here
your public key here
and your hostname here
should be replaced with their respective values
First, run docker-compose up -d util-cli
, and keep note of the name of the container created. Then, run docker attach {container-name}
you will be provided a shell from which you can run different utilities to perform administrative actions. Administrative actions include adding SSL keys for signin tokens, creating accounts, downloading CAPWATCH files, importing CAPWATCH files, and sending global notifications.
By running docker-compose up -d mysqlsh
, keeping note of the name of the container created, and then running docker attach {container-name}
, you will be dropped into a mysqlsh session
To import a new CAPWATCH file, run docker-compose up download_capwatch_update
By running docker-compose up main
, it will build and start the MySQL database as well as the server itself. To get SSL for HTTPS as well, modify and then run scripts/init-nginx-ssl.sh
with your email and then use docker-compose up main proxy
instead.
From inside the util-cli container started here, you can run the createAccount.js
file to start the process of creating an account that can be used to process data
To access the site, you have to use a domain name that starts with the account ID you used earlier. For instance, to access the md089
account, you would go to md089.events.md.cap.gov
.
If you are a unit commander or unit IT officer looking to implement this for your squadron, you can instead send an email to eventsupport@md.cap.gov
to request an official Event Manager website.
This will take advantage of the hosting and support already available, and will allow for cross unit communication with units already established under the cap.gov domain.
CAPWATCH data for all Maryland Wing members and units is already being handled.
There is currently a feature request being worked on which will allow you as a unit commander or unit IT officer to upload your own CAPWATCH data to a Event Manager hosted unit. This feature request can be tracked here.