Code Monkey home page Code Monkey logo

laravel-9-docker's Introduction

Laravel 9 Docker Template

PHP Tests

This is a docker template for local development using Laravel 9. It is opinionated and using Laravel Socialite with pre-setup Google Authentication. You should setup credentials in google and then add the following keys to your .env file (not the other .env. files)* so you can authenticate through Google, or don't and roll your own:

GOOGLE_CLIENT_ID="clientidhere.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET="secrethere"

Setup

1. Clone the repo

git clone [email protected]:Readus-01/laravel-9-docker.git laravel-9-docker && cd laravel-9-docker

2. Build the container

npm run container:build

Alternatively, setup for your own repo

1. Click "Use this template" in Git

2. Build the container

Bring your code down locally from your own repo and then run:

npm run container:build

Access

Open the browser and see "hello world"

http://localhost:3005/

Use PHPMyAdmin if you want

http://localhost:3010/

Useful commands

This is not an exhaustive list. Use npm run to see a list of all commands.

Command Description
npm run composer Run composer commands
npm run artisan Run artisan commands
npm run shell Access the container
npm run dev Quickly build the frontend
npm run prod Build the frontend for production
npm run migrate Run database migrations
npm run migrate:undo Undo the last migration
npm run migrate:refresh Wipe and redo database migrations
npm run test Run unit/feature tests
npm run phpcs Run phpcs tests

*Additionally commands can be run using docker-compose exec for example

docker-compose exec laravel php -i will show PHP info.*

Future updates

I will update this from time to time to resolve security issues / vendor updates. Although it is unlikely I'll add specifically new features, but rather use this template as a blank slate / baseline to create new Laravel packages that can be used as vendors. Will update this readme if/when a new package created is compatible with this repo.

laravel-9-docker's People

Contributors

dependabot[bot] avatar readus-01 avatar runthis 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.