Git Product home page Git Product logo

simple-blog's Introduction

Blog Application

This is a full-stack application that brings you the ability to have a blog.

Caution: you can quickly start the project and then to find out about the application default users need to check the application readme file. last but not least you can open localhost on your browser to see the first page of the application running.

Index

Quick Start

To quickly bring up the application you can use the setup command like bellow.

make setup

this command will bring up the docker environment and seeds default data into the database. and then everything thing is ready for you to explore, you just need to open your browser and click on this like.

now you can easily login to the application using provided users that are mentioned in here.

Structure

The project structure is as bellow

  • .assets The assets of the readme file are placed here
  • .web The nginx configurations are placed here
  • .backend The backend application configurations are placed here
  • src The application itself
  • .gitignore The assets that should be ignored by git
  • docker-compose.yml docker compose configuration
  • Makefile This file is here to help working with the project

Requirements

You need docker and docker-compose in order to run this application. If you don't have make on your operating system for running the application, you need to read Makefile and do as up method says, otherwise you just need to follow Running section.

Requirement list

  • docker you need to have docker installed and running on your system, and be able to run the program without using sudo command.
  • docker-compose you need to have docker compose installed on your os.
  • make in order to use the make command you need to have this package installed, chances are you have this package already installed on your os, specially if you are a linux user, if you don't have it, and you are not willing to install it, you can open the Makefile located in the projects root, and run the commands yourself line by line based on what command you need.

Usage

In this section working with the application is described.

Run Application

For running application you need to execute up method using make command like bellow:

make up

You can add options like --build to rebuild the images again or --remove-orphans for removing unused made services by the up command like bellow.

make up options="--build --remove-orphans"

Status

If you need to check the project's container states, you can do so by one of the bellow commands.

make ps
make status

Down

You can stop the project using bellow command.

make down

Destroy

If you wish to destroy the project's allocated volumes and containers you can do so like this.

make destroy

Shell

You can log into the container using bellow command.

make shell

You can also run your command directly outside the container like bellow.

make shell run="composer fix"

And you can log into another container like web or database with bellow command.

make shell service=web run=ash

View Logs

You can check the docker logs using bellow command.

make logs

You can follow the logs like bellow too.

make logs follow

And last but not least, you are able to define your considered service like bellow.

make logs service="web"

And for following also, you just need to tell it to follow too, like bellow.

make logs service="web" follow

Tests

You can run tests outside the application's container by make tool using bellow command.

make test

Coverage Report

You can get a nice test coverage report from the PHPUnit by running this command.

make coverage

Diagram

Blog database diagram

simple-blog's People

Contributors

adnanahmady avatar

Watchers

 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.