Ensure you have the following software installed:
git clone https://github.com/LymarMaryna/laravel-docker-test-project.git
cd laravel-docker-test-project
Copy the src/.env.example
file to src/.env
and update the environment variables as necessary:
cp src/.env.example src/.env
Make sure your src/.env
file contains the following PostgreSQL configurations:
DB_CONNECTION = pgsql
DB_HOST = db_postgres
DB_PORT = 5432
DB_DATABASE = postgres
DB_USERNAME = postgres
DB_PASSWORD = postgres
Add into src/.env
file credentials from CoinGecko API and JWT secret key
COIN_API_URL = https://api.coingecko.com/api/v3/coins/markets
COIN_API_KEY = your_api_key_here
JWT_SECRET = your_jwt_secret_here
bash RunMe.sh
The application should now be running on http://localhost
Commands to run in the cli for parsing data from the API and saving it to the database:
bash FetchData.sh
also you can call:
docker-compose exec app php artisan parse:currencies
To stop the Docker application, follow these steps:
Ensure you are in the directory containing your docker-compose.yml
file. Use the cd
command to navigate to your project directory:
cd /path/to/your/project
To stop the Docker application, use the following command:
docker-compose down
GET /api/currencies
GET /api/currencies/${identifier}
POST /api/issue-token