Public | Automated Build

Last pushed: 7 months ago
Short Description
A Webserver in Express & Angular on Node & Alpine inside Docker
Full Description

expressServer

A Webserver in Express & JQuery on Node & Alpine inside Docker
by Collective Acuity

Features

  • Express in a Container
  • Local Credential Controls
  • Lean Footprint
  • Tunnel Ready for Testing
  • EC2 Ready for Deployment

Requirements

  • Node libraries in package.json file

Components

  • Alpine Edge (OS)
  • NodeJS 4.2.6 LTS (Environment)
  • Express 3.21.2 (Server)
  • JQuery 2.2.3 (Framework)

Dev Env

  • Docker (Provisioning)
  • Bitbucket (Version Control)
  • LocalTunnel (Secure Tunnel)
  • PyCharm (IDE)
  • Google Drive(Sync, Backup)

Languages

  • Javascript
  • Shell Script

Setup DevEnv

  • Install Docker Toolbox on Local Device
  • Install Git on Local Device
  • Clone/Fork Repository from Version Control service
  • Create a /cred Folder in Root to Store Tokens
  • [Optional] Create a New Private Remote Repository

Server Sub-folders

-- assets/ (backend code and project resources)
-- public/ (public accessible application content)
-- views/ (html/jinja templates)

Launch Commands

start.sh
Creates container with required volumes and starts express on node
Requires:

  • Container Alias
  • Container Ports
  • Mapped Volumes
  • Initial Command
  • Container Root Folder Name (if AWS EC2 deployment with awsDocker module)
  • Virtualbox Name (if Windows or Mac localhost)

rebuild.sh
Initiates an automated build command on Docker to update base image
Requires:

  • Container Alias
  • Token from Docker Build Settings
  • Environment Variable File (in cred/docker.yaml)

tunnel.sh
Initiates a secure tunnel from local device to endpoint on localtunnel.me
Requires:

  • Container Alias

Collaboration Notes

The Git and Docker repos contain all the configuration information required for collaboration except access tokens. To synchronize access tokens across multiple devices, platforms and users without losing local control, you can use LastPass, an encrypted email platform such as ProtonMail or smoke signals. If you use any AWS services, use AWS IAM to assign user permissions and create keys for each collaborator individually. Collaborators are required to install all service dependencies on their local device if they wish to test code on their localhost. A collaborate should always FORK the repo from the main master and fetch changes from the upstream repo so reality is controlled by one admin responsible for approving all changes. New dependencies should be added to the Dockerfile, NOT to the repo files. Collaborators should test changes to Dockerfile locally before making a pull request to merge any new dependencies:

docker build -t test-image .

.gitignore and .dockerignore have already been installed in key locations. To prevent unintended file proliferation through version control & provisioning, add/edit .gitignore and .dockerignore to include all new:

  1. local environments folders
  2. localhost dependencies
  3. configuration files with credentials and local variables
Docker Pull Command
Owner
collectiveacuity
Source Repository

Comments (0)