bocoup / people

Bocouper directory.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This service has been discontinued.

Bocoup replaced the "People" service in late 2022 with another solution. This repository is archived, but can be forked or used for informational purposes.

Nest People

Dependencies

The following will need to be installed on your local development machine before you can use this workflow. All versions should be the latest available, as some required features may not be available in older versions.

Development

  1. Run npm install to install local dependencies.
  2. Run vagrant up to start the Vagrant box.
  3. Run grunt to build the site into public to start the file-watcher and the live-reload process.
    1. Browse to http://people.loc/
    2. Edit files in src and see the webpage update automatically.
  4. Run npm test if you only want to run lint and tests, without the watch task

Note that after changes to Gruntfile.js or any of the Grunt-related files in the grunt directory, grunt will need to be restarted.

Testing the build process

  1. Run grunt build to build the site into public.
  2. If you had previously test-deployed a local commit (see below), run ./deploy/run-playbook.sh vagrant-link vagrant.
  3. Browse to http://people.loc/
  4. Re-build and refresh the browser to see changes.

Continuous Deployment

Merging to production will automatically trigger a deploy to people.bocoup.com, and merging to master will deploy to people-staging.bocoup.com.

In the (hopefully) rare instance you need to manually deploy the steps are below.

Manual Deployment

Test-deploying a local commit (Vagrant)

  1. Run ./deploy/run-playbook.sh deploy vagrant local=true commit=_____ where _____ is the local commit ref (branchname, SHA, etc) to deploy. For a complete list of options, see the deploy role docs.
    • Simulate deploying to production or staging by adding env=production or env=staging to the end of this command.
  2. Browse to http://people.loc/

Deploying to staging

  1. Run ./deploy/run-playbook.sh deploy staging commit=_____ where _____ is the commit ref (branchname, SHA, etc) in GitHub. For a complete list of options, see the deploy role docs.
  2. Enter your dploy sudo password when asked.

Deploying to production

  1. Run ./deploy/run-playbook.sh deploy production commit=_____ where _____ is the commit ref (branchname, SHA, etc) in GitHub. For a complete list of options, see the deploy role docs.
  2. Enter your dploy sudo password when asked.

Running specific Ansible playbooks

Configuration

Playbooks and Roles:

  • provision - Install all dependencies required to build the base box.
    • base role - Install Apt packages.
  • configure - Configure the box and get services set up. The following roles may be run individually via a role-named tag, eg. --tags=nginx:
    • configure role - Basic server configuration.
    • nginx role - Enable SSL (if specified) and configure nginx.
  • vagrant-link - Link local working project directory into the Vagrant box so local changes can be previewed on the server. This playbook overrides the deploy playbook, and vice-versa.
  • deploy - Deploy the specified commit to the server and run the project build. For a complete list of options, see the deploy role docs. documentation](https://deployment-workflow.bocoup.com/#deploy-role) for an explanation of the available options.
  • init - Run provision, configure and vagrant-link playbooks. Runs on vagrant up.

Examples:

Note: more information is available on the Modern Web Deployment Workflow website.

# Run all configure playbook roles:

$ ./deploy/run-playbook.sh configure vagrant


# Run configure playbook role tagged "nginx":
# (valid tags are: configure, users, nginx)

$ ./deploy/run-playbook.sh configure vagrant --tags=nginx


# Deploy local branch "my-feature" to Vagrant for testing:

$ ./deploy/run-playbook.sh deploy vagrant local=true commit=my-feature


# Deploy branch "my-feature" from GitHub to staging:

$ ./deploy/run-playbook.sh deploy staging commit=my-feature


# Deploy master to production:

$ ./deploy/run-playbook.sh deploy production

After Deploying

You can see what version is deployed using this url or one like it:

https://people.bocoup.com/assets/build.txt

Configuration

API Root

The API urls are configured in /src/config.js. These URLs are based the value of the APP_ENV environment variable, and defaults to that of the development environment. This file should only need to be changed if the location of the API changes.

Authentication Providers

The list of authentication providers is set in /src/config.js. These are the providers a user can choose to authenticate with. Currently, the Bocoup API only supports GitHub authentication.

About

Bocouper directory.

License:MIT License


Languages

Language:JavaScript 92.1%Language:CSS 3.6%Language:Shell 3.0%Language:HTML 0.5%Language:DIGITAL Command Language 0.4%Language:Stylus 0.4%