Coder Social home page Coder Social logo

php-school / phpschool.io Goto Github PK

View Code? Open in Web Editor NEW
44.0 8.0 21.0 31.39 MB

๐ŸŒ PHP School Website http://www.phpschool.io/

License: Apache License 2.0

HTML 1.28% JavaScript 2.80% CSS 0.40% Ruby 0.12% PHP 31.00% Dockerfile 0.06% Vue 64.34%

phpschool.io's Introduction

Install

You will need composer, node and docker.

npm install
npm run build
cp .env.dist .env
docker-compose build

Run

docker-compose up -d
docker compose exec php composer install

Create DB Scheme

docker compose exec php composer app:db:update

Import DB

docker-compose exec -T db mysql -uroot phpschool -proot < phpschool.sql

Generate Blog

docker compose exec php composer app:gen:blog

Then navigate to http://localhost !

Build CSS & JS

This needs to be done for the main website (non cloud) to run in development mode.

npm run build

Building CSS & JS for cloud dev

The cloud styles and JS are built using vite.js and therefore has a dev/watcher mode with hot/live reloading.

Run:

npm run dev

You will also need to symlink the image directory:

ln -s ../../assets/img/cloud public/img/cloud

For GitHub login

Add 127.0.0.1 www.phpschool.local to /etc/hosts

Create a GitHub oauth App:

Application Name: PHP School Local Homepage: http://www.phpschool.local Authorization Callback URL: http://www.phpschool.local/student-login:

Take the client secret and client ID and place them in your .env file under the keys: GITHUB_CLIENT_ID & GITHUB_CLIENT_SECRET.

View cache keys

docker-compose exec redis redis-cli keys '*'

Clear cache

docker-compose exec php composer app:cc

Deploy

You will need capistrano installed and SSH access to the production server.

cap production deploy

Production deploy requisites

Letsencrypt certs should be setup and located in /etc/letsencrypt

Make sure .env file exists in shared folder. You can use env.dist as an example.

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.