https://github.com/simplymichael/nginx-mysql-php
https://github.com/simplymichael/nginx-mysql-php
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/simplymichael/nginx-mysql-php
- Owner: simplymichael
- Created: 2022-11-04T20:44:30.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-06T21:00:59.000Z (over 2 years ago)
- Last Synced: 2024-12-30T00:50:40.387Z (5 months ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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`.