A Virtual-Host style webserver written in Go using the Echo Web Framework.
A sidecar container syncs files from an S3 bucket to a container volume data mounted at /data. The data volume is shared between the sidecar and appserver containers, providing the files to be served by appserver
The entire stack can be brought-up locally using docker-compose.
MINIO - which has a AWS S3 compatible API - is used locally in place of AWS S3. Files and folders placed in the ./apps directory of this repository will be loaded into MINIO on docker-compose up.
| Application | Hosted Locally At ... |
|---|---|
| Home | home.localhost:8080 |
| Cumulus | cumulus.localhost:8080 |
| MIDAS | midas.localhost:8080 |
| Access to Water | water.localhost:8080 |
-
APPSSERVER_DOMAIN: Top level domain where all apps will be served. Individual apps are served as a sub-domain to this top level domain. Default value for development -
APPSERVER_SUBDOMAIN_PREFIX: Prepend all hostnames with this prefix. This is most easily explained using a practical example: -
APPSERVER_RELOAD_INTERVAL: How often to reload the appserver. A reload causes the appserver to serve any new content made available byappserver-sidecarsinceappserverwas last started. Example Values: 5m, 10s, 1h (values supported by bashsleepcommand)For application
water, settingAPPSERVER_DOMAIN=rsgis.devandAPPSERVER_SUBDOMAIN_PREFIX=develop-serves the applicationwateratdevelop-water.rsgis.dev. SettingAPPSERVER_DOMAIN=rsgis.devand omittingAPPSERVER_SUBDOMAIN_PREFIX(i.e."") serves the applicationwateratwater.rsgis.dev. Practically, this is used to servedevelopmentandstableversions of apps using different s3 buckets, but the same container image.
AWS_REGION: Credentials to serve files from S3 Bucket (may or may not be explicitly required depending on your deployment details)AWS_ACCESS_KEY_ID: Credentials to serve files from S3 Bucket (may or may not be explicitly required depending on your deployment details)AWS_SECRET_ACCESS_KEY: Credentials to serve files from S3 Bucket (may or may not be explicitly required depending on your deployment details)S3_BUCKET: Name of S3 Bucket where files to be served existS3_ENDPOINT_URL: Endpoint for S3 API Access - used for local development and testing againstminio(set to http://minio:9000 for development)