Skip to content

alch/opendata

Repository files navigation

Opendata from SomHackaton19

This is a symfony 4/2 project powered by api-platform 2.3

This is a sample project using open data that the Matarò city hall released for the 2019 edition of the SomHackaton

Data was originally shared as CSV.

This project simply imports the CSV into a mysql schema, using vanilla Doctrine ORM and API Platform to expose CRUD API methods for generated entities.

Example in https://opendata-mataro.antaivb.com/api/docs

Run the project locally using docker and compose.

You will need GNU Make in order to run the script!

Just do a

$ make devtool

To bring up a compose stack with the symfony application and the mysql database.

Once the Build is done and compose has created the services, just point uyour browser to http://localhost:8000/api/docs to access the Swagger documentation.

Bonus: Docker image build

The default make target creates a php-fpm image with the project. You will need to pass the DOCKER_REGISTRY as an environment variable to the make script aware of the registry.

By using the make push target you will push the image to the registry, provided you have credentials.

Here you have two different methods to authenticate against Amazon ECR, with the make login-role, or make loigin-credentials, depending whether you want to authenticate using AWS Security Cedentials or the Role of the ec2 instance running the build

About

Symfony 4/API platform - Opendata from Mataro public administration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages