Skip to content

kromacie/course_rating

 
 

Repository files navigation

Quick startup

For docker (linux)

Allows you to quick setup development environment

  • Setup host configuration

    • First, you have to create .env file from .env.example
    • Configure .env variables
      ###> docker/dev ###
      # Set a port where the app should be served on your localhost
      APP_PORT=8080
      
      # Set a port where the database should be served on your localhost
      DB_PORT=3310
      ###< docker/dev ###
      
      ###> docker/mysql ###
      # Set the database user name
      MYSQL_USER=user
      
      # Set the database name
      MYSQL_DATABASE=database
      
      # Set the database user password
      MYSQL_PASSWORD=pass
      
      # Set the database password for the CLI usage
      MYSQL_ROOT_PASSWORD=pass
      
      # It should be untouched if its running in docker
      MYSQL_HOST=database:3306
      ###< docker/mysql ###
      
  • Build images using

    docker-compose -f docker-compose.yml -f docker-compose.development.yml build
    
  • Download dependencies using

    docker-compose -f docker-compose.yml -f docker-compose.development.yml run --no-deps api /bin/bash -c "composer install"
    
  • Start development server

    docker-compose -f docker-compose.yml -f docker-compose.development.yml up -d
    

    Website will be available on localhost:APP_PORT (host).

  • Access container environment

    • If it's running

      docker-compose exec api /bin/bash
      
    • If it's not running (without database access)

      docker-compose -f docker-compose.yml -f docker-compose.development.yml run --no-deps api /bin/bash
      

    If you want to stop the server, type docker-compose stop on your host machine.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 80.1%
  • JavaScript 10.0%
  • TypeScript 3.4%
  • Shell 2.6%
  • HTML 2.0%
  • CSS 1.1%
  • Dockerfile 0.8%