Giter Site home page Giter Site logo

handsup-docker-example's Introduction

Setup Handsup project with Docker

This example docker-compose setup is explicitly for handsup corporate backend project. However, you might find it useful to setup your own local environment for whatever you are building.

This stack is composed of [email protected], nginx, MySQL and Redis.

Why?

As I came across setting up local dev environment, installing PHP on macos is really a pain in the ass. It took me 3 days to complete the environment setup. Thought it would be useful to have a consistent environment setup guide for future new comers on handsup-api project.

Clone this project to your root project directory

git clone [email protected]:huangc28/handsup-docker-example.git

docker-compose.example.yml

Move docker-compose.example.yml to your handsup-api root project directory.

SSL certificate

Create a local SSL certificate using mkcert. you will get two files

  • {{ YOUR_DOMAIN }}.key.pem
  • {{ YOUR_DOMAIN }}.pem

Rename {{ YOUR_DOMAIN }}.key.pem to {{ YOUR_DOMAIN }}.key and place it in docker/php. Rename {{ YOUR_DOMAIN }}.pem to {{ YOUR_DOMAIN }}.crt and place it in docker/php.

public / private key

Move your ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub to docker/php. The reason being that we need ssh key to pull dependencies from handsup private registry.

.env.example

Copy and paste the content in .env.example file to your handsup-api project root .env file. The following env variables are needed to spin up docker-compose properly.

APP_PORT=8888
APP_TSL_PORT=443
SYSTEM_ENV=DOCKER
PROJECT_PATH=/var/www

MYSQL_SERVER=127.0.0.1
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=

REDIS_SERVER=127.0.0.1
REDIS_PORT=6379

spin up and run!

prompt docker-compose up to spin up the stack. prompt http://localhost:8888 in the browser, you should see laravel index page. you are ready to go!

handsup-docker-example's People

Contributors

huangc28 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.