An open API service indexing awesome lists of open source software.

https://github.com/simplymichael/nginx-mysql-php


https://github.com/simplymichael/nginx-mysql-php

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

## Prerequisites
- Docker
- Docker compose
- Copy `.env.example` to `.env` and edit the `.env` file.
- Create an *app/* directory
and place your application files with a *public/* directory inside the *app/* directory.
Your web app will be served from the *app/public/* directory.

## Running
- **First run:** Run `docker-compose up -d --build`.

You can follow the logs by running `docker-compose logs -f php`.
- **Subsequent runs:** Run `docker-compose up -d`
- Give it a few minutes to startup the services.
You can run `docker-compose logs -f php` on the CLI to know when the server is ready to handle connections.
- Navigate to *http://localhost:* where is the PORT value set in the *.env* file.

## Working With The Application

### Container and Service Administration
- To log into any container, run:
`docker exec -it _ bash` .
- To view the logs of any service, maybe for troubleshooting purposes, run:
`docker-compose logs -f `.

Here,
- ** is the name of the containers as specified inside the `.env` file.
- ** is the name of the service. The following services are available:
- **php**
- **nginx**
- **mysql**
- **rabbitmq**

For example, assuming the is **sample_app**,
- to log into the **php** container service, run: `docker exec -it sample_app_php bash`.
- to view the logs of the **nginx** service, run: `docker-compose logs -f nginx`.