[go: nahoru, domu]

Skip to content

LymarMaryna/laravel-docker-test-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-compose laravel + postgres

This project is a Laravel application configured to run with a PostgreSQL database using Docker.

Follow the instructions below to set up and run the project.

Installation

Ensure you have the following software installed:

1. Clone the repository:

git clone https://github.com/LymarMaryna/laravel-docker-test-project.git
cd laravel-docker-test-project

2. Create an environment file.

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

3. Run bash script to set up the project:

bash RunMe.sh

4. Access the application:

The application should now be running on http://localhost

5. Usage

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

6. Stopping the Docker Application

To stop the Docker application, follow these steps:

Step 1: Navigate to the Project Directory

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
Step 2: Stop the Docker Application

To stop the Docker application, use the following command:

docker-compose down

API Routes

Currencies

List Currencies

  GET /api/currencies

Show Currency

  GET /api/currencies/${identifier}

Authentication

Issue JWT Token

  POST /api/issue-token

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages