Skip to content

5baddi/clnkgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClnkGO

PHP MySQL Laravel

Get in the press 📰 Be the source a journalist is looking for.

screenshot

Requirements

  • PHP >= 7.4
  • Docker

Get started

Setup

  1. Clone the repository into ~/dev
git clone git@github.com:baddiservices/clnkgo.io.git
  1. To avoid user/group permissions issues, let's export your user ID & group ID
export WWWUSER=$(id -u ${USER}) WWWGROUP=$(id -g ${USER})
  1. Copy .env.example to .env
cp .env.example .env
  1. Build docker containers
docker-compose up -d
  1. Check all containers are running
docker-compose ps
NAME COMMAND SERVICE STATUS PORTS
mysql "tini -- /docker-ent…" mysql-server running (healthy) 0.0.0.0:3306->3306/tcp
clnkgo "start-container" php71 running 0.0.0.0:80->80/tcp
  1. Connect to app container via SSH
docker-compose exec clnkgo /bin/bash
  1. Install project dependencies
> composer install && php artisan key:generate && php artisan storage:link
  1. Run migration and seed default data
> php artisan migrate && php artisan db:seed && php artisan passport:install
  1. Build front end
> npm install && npm run dev

Dependencies installation

(Assuming you've installed Composer)

Fork this repository, then clone your fork, and run this in your newly created directory:

composer install

Project configuration

Next you need to make a copy of the .env.example file and rename it to .env inside your project root.

Run the following command to generate your app key:

php artisan key:generate

Run the database migrations (Set the database connection in .env before migrating)

php artisan migrate && php artisan db:seed

Then start your server:

php artisan serve

You can now access the server at http://127.0.0.1:8000

To see all defined routes and corresponding controllers methods use php artisan route:list console command

Queue listen

php artisan queue:work --timeout=2000 --sleep=3 --tries=3 --daemon

Run scheduled commands

php artisan schedule:run

Twitter API Config variables

  • TWITTER_BEARER_TOKEN

    Set your Twitter App API bearer token you can get it from your Twitter developer account

  • TWITTER_MAIN_HASHTAGS

    Set main hashtags for queries

Stripe API Config variables

  • STRIPE_API_SECRET_KEY

    Set your Stripe API secret key you can get it from your Stripe account