/vaccinateoh

Primary LanguagePHPMIT LicenseMIT

Vaccinate Ohio Website

Getting Started

First-Time Install

  1. Install Docker
  2. Install docker-compose
  3. Clone this repo git clone git@github.com:Cant-Stop-Columbus/vaccinateoh.git
  4. cd build
  5. Using the build/env.mk.example as a template, create a build/env.mk file with at least a value for your local domain (ensure the hostname you use is pointed to your machine) and avoid pulling images from a docker repo:
export LOCAL_DOMAIN=vaccinateoh.local
  1. Follow the instructions in Starting Your Environment.

Starting Your Environment

Follow these steps to start your dev environment:

  1. make nginx-proxy before accessing the site to start nginx-proxy.
  2. make up to start your local web, db, mailhog, and pgadmin containers
  3. make setup-environment if this is the first time that you are starting your dev environment. This step will install dependencies, run migrations and seeders, and build assets.
  4. make watch. Run this step while doing development to run the app build process inside the web container while coding/testing/designing.
  5. Visit the site in your browser at https://vaccinateoh.local (or the domain and port you selected above in step 5 of First-Time Install).

Stopping Your Dev Environment

  1. Ctrl-C the running make watch.
  2. make down to stop the local web, db, mailhog and pgadmin containers.
  3. make nginx-proxy-down to stop the nginx-proxy container.

Notes

  • make down will stop all containers except the nginx-proxy container.
  • make nginx-proxy-down will stop the nginx-proxy container.

Instructions for Windows Machine

After following steps in First-Time Install before proceeding to Starting Your Environment, perform the below steps.

Using Powershell in Administrator mode.

  • Install the chocolatey package manager for Windows compatible to Windows 7+ / Windows Server 2003+ following instructions
  • Run choco install make in Powershell Window.
  • Open Git Bash Window with path set to Build folder and follow steps in Starting Your Environment.

While Executing make setup-environment on Windows if we get the below error follow resolution steps.

$ make setup-environment docker-compose exec --user=application web yarn install the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty' make: *** [Makefile:164: install] Error 1

To fix this we can modify the build/env.mk file in build folder and add below commands to the environment make file which is specific to developer.

  • DOCKER_WEB_EXEC=winpty docker-compose exec --user=application web
  • DOCKER_DB_EXEC=winpty docker-compose exec db
  • DOCKER_DB_COMMAND=winpty docker-compose exec -T db