Giter Site home page Giter Site logo

vilkass / team-krab Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tidehackathon/team-krab

0.0 0.0 0.0 12.59 MB

KRAB - Interoperability Dashboard Challenge

Shell 0.32% JavaScript 47.78% PHP 33.84% Makefile 0.36% Blade 15.26% Dockerfile 0.13% SCSS 2.32%

team-krab's Introduction

team-krab

KRAB - Interoperability Dashboard Challenge

Dashboard page

Main part

Screenshot 1

Comparing countries by table

Screenshot 1

Information about our project and set up

Laravel 9 Docker template using PHP 8.1.6, nginx, redis, and Postgres SQL 14.4.

Features

Getting Started

Prerequisites

  • Using UNIX-based system.
  • Download and Install Docker.

Installation

0. Clone this project

1. Create .env file from .env.example in root directory

The given configuration will be used by Docker to build the containers.

If you change NGINX_PORT to other than port 8000 or PHP_PORT to other than port 9000, you need to adjust listen and fastcgi_pass in nginx configuration at /nginx/default.conf.

For example, if you change NGINX_PORT to port 8005 or PHP_PORT to port 9005, the /nginx/default.conf will be filled like this:

server {
	listen 8005;
	...
    
	location ~ \.php$ {
		try_files $uri =404;
		fastcgi_split_path_info ^(.+\.php)(\.+)$;
		fastcgi_pass php:9005;
		...
	}
	...
}

2. Run command make build on your terminal

This command will build Docker Compose containers.

3. Run command make up on your terminal

This command will run Docker Compose containers.

4. Run command make ex on your terminal

This command will open PHP container terminal.

5. Adjust .env file in /src directory

The given DB credentials, DB port, and Redis port in /src/.env must be equal to the given values in /.env.
You also need to change DB_HOST value in /src/.env based on this format: {CONTAINER_PREFIX}_postgres.
You can see the value of CONTAINER_PREFIX in /.env at the project root directory.

6. Go to http://localhost:8000/ or any port you assign to NGINX_PORT in the root directory .env file

This action will open Laravel application in a web browser.
If you want to open Laravel Telescope page, you can access http://localhost:8000/telescope or any port you assign to NGINX_PORT in the root directory .env file.

Available Commands

To run NPM or composer command, your terminal need to be inside src directory in PHP container terminal.
To do that, you need to open PHP container terminal by running make ex on the project root directory.
Then, in the PHP container terminal, go to src directory by running cd src.

Makefile

Makefile command can be run on the project root directory, where Makefile resides in.

  • make build : build Docker Compose containers
  • make up : run Docker Compose containers
  • make stop : stop Docker Compose containers
  • make down : remove Docker Compose containers
  • make purge : remove Postgres SQL volume in host.
  • make ex : open PHP container terminal
  • make analyse : run static analysis and store the result in /src/storage/logs/analyse.log

Composer

Your terminal needs to be inside src directory in PHP container terminal.

  • composer test : run Laravel automated test in parallel
  • composer ide-helper : run Laravel IDE Helper

NPM

Your terminal needs to be inside src directory in PHP container terminal.

  • npm run format : reformat code using Prettier
  • npm run format:check : check code format using Prettier

team-krab's People

Contributors

wiliamhw avatar xomka17 avatar jug-of-punch avatar tidehackathon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.