I made this project to practice PHP, Nginx, Docker, PostgreSQL, Slim Framework, RabbitMQ, PHPUnit and Elasticsearch. The idea is to create a simple API to manage posts using all these resources.
The Readme is incomplete!
To upload the containers, simply run the docker-compose up --build
command at the root of the project.
To enter the Postgres container, simply run the docker exec -it posts-api-ecosystem-db-1 bash
command in the terminal.
To use the CLI in the database container, simply run the command psql -U postgres -d posts
in the database container terminal.
To create the database and table, simply run the following commands in the database container terminal:
CREATE DATABASE events ;
Nginx will be available at http://localhost:8080
RabbitMQ will be available at http://localhost:15672
. user = guest, password = guest
Kibana will be available at http://localhost:5601
. user = elastic, password = changeme
To test the endpoints, you can use the api.http file that is in the root of the project with the VSCode REST Client extension.
Endpoints:
Notes: