Hammer is an API that exposes services that developers normally use so they can build a mobile app or website on top of it.
For now it integrates with:
- GitHub
Copy the .env to .env.local and add configuration for the services you want to use.
The API is powered by Symfony 4 and it only needs a server running PHP 7.2 and a database (MySQL/SQLite).
Configuration for Docker is provided. To develop locally, just run:
$ docker-compose up
It is a read-only API. All the endpoints return JSON and just proxy the original API responses.
It uses Nelmio API Docs, check /v1/docs.
Configuration was added to deploy to AWS ElasticBeanstalk.
Make sure you have the command eb available. Tested with: EB CLI 3.14.3, aws-cli/1.15.20 (Python 3.6.1).
-
pip install -r requirements.txt
-
aws configure --profile hammer
-
aws ec2 create-key-pair --profile hammer --key-name=hammer --query 'KeyMaterial' --output text > ~/.ssh/hammer.pem
-
chmod 400 ~/.ssh/hammer.pem
Create certificate, check your e-mail and validate before proceeding, and edit .ebextensions/00-custom.config with the certificate ARN
-
aws acm request-certificate --profile hammer --domain-name titodevops.com --idempotency-token=frgasaseae3e2da --subject-alternative-names *.titodevops.com
-
php composer.phar install
-
make build
-
Init project: eb init hammer --profile hammer --quiet
-
Create an environment: eb create development
-
Configure environment variables: eb setenv APP_NAME=hammer NAME=VALUE ...
-
Deploy a new version: eb deploy development