Coder Social home page Coder Social logo

lovata.com's Introduction

Project docker configuration

Docker-compose file contains:

  • "backend_app" container. It is main container to run PHP.
  • "schedule" docker container is copy of "backend_app" container. "schedule" needs to run php artisan schedule:run command.
  • "queue" docker container is copy of "backend_app" container. "queue" needs to run php artisan horizon command.
  • local and staging environment contains mailpit docker container. mailpit uses to send email locally.

Prepare local environment

  • You should install docker, ansible, make.
    • For Ubuntu: sudo bash bash/install-ubuntu.sh.
    • For Linux Mint: sudo bash bash/install-mint.sh.
  • Run sudo usermod -a -G docker $USER. You need reboot system, after running the command.

Usage guide

  • You can run the project using make local-up command.
  • You can connect to backend_app container using make local-bash command.

Fresh start

  • Create .vault-password-local file with password for local environment
  • Clone app repository to /app folder
  • Run command make local-init to init config files
  • Run command make local-up to run docker containers
  • Run command make app-composer-install to install vendor dependencies
  • Run command make app-create-database to create fresh database
  • Run command make local-bash to connect to backend_app container and apply migration

Command list

Generate docker-compose file, .env files, nginx configuration and etc.

make local-init {inventory=production}

Run docker containers

make local-up

Stop docker containers

make local-stop

Connect to backend_app container

make local-bash

Connect to backend_app container and apply migrations

make app-migrate

Connect to backend_app container and install composer install vendor dependencies

make app-composer-install

Connect to backend_app container and create app_db database

make app-create-database

Connect to backend_app container and apply dump file. You should copy the dump file to temp/db/dump.sql

make app-apply-dump

xDebug configuration

  • Open /app folder with app code in PHPStorm
  • Go to File -> Settings -> PHP
  • Choose or create new CLI interpreter

Example of CLI interpreter

  • Add Debug configuration "PHP Remote debug"

Example of Debug configuration

  • Add Server configuration

Example of Server configuration

lovata.com's People

Contributors

kharanenka avatar antalikavasilkova avatar natali-vasilkova avatar

Watchers

Pavel Lautsevich avatar  avatar

lovata.com's Issues

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.