Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toa-anakin/codeigniter-docker-dev
Docker setup for Code Igniter projects with Nginx and PHP 8.2, MySQL 8.0, phpMyAdmin
https://github.com/toa-anakin/codeigniter-docker-dev
codeigniter codeigniter-docker codeigniter4 docker docker-codeigniter mysql mysql80 nginx php php82 phpmyadmin
Last synced: about 1 month ago
JSON representation
Docker setup for Code Igniter projects with Nginx and PHP 8.2, MySQL 8.0, phpMyAdmin
- Host: GitHub
- URL: https://github.com/toa-anakin/codeigniter-docker-dev
- Owner: TOA-Anakin
- License: mit
- Created: 2023-12-02T05:33:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-02T05:49:24.000Z (about 1 year ago)
- Last Synced: 2024-10-14T05:42:02.563Z (3 months ago)
- Topics: codeigniter, codeigniter-docker, codeigniter4, docker, docker-codeigniter, mysql, mysql80, nginx, php, php82, phpmyadmin
- Language: Dockerfile
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Dev Setup for CodeIgniter projects
## Local dev guide (Linux)
1. Clone the repo:
```.sh
git clone https://github.com/TOA-Anakin/codeigniter-docker-dev.git
```
2. Rename the cloned repo as desired:
```.sh
mv codeigniter-docker-dev your_project_name
```
3. Check your user ID using the `id -u` command and update the `.docker/.env` file accordingly.
4. `cd` into the `.docker` directory and build the Docker containers:
```.sh
cd your_project_name/.docker
docker compose up -d --build
```
Before the end of the process you should see a list of newly created (now running) containers:
```.sh
[+] Running 5/5
✔ Network codeigniter_docker_dev_app
Created 0.2s
✔ Volume "codeigniter_docker_dev_db"
Created 0.0s
✔ Container codeigniter_docker_dev-phpmyadmin-1
Started 0.2s
✔ Container codeigniter_docker_dev-db-1
Started 0.2s
✔ Container codeigniter_docker_dev-nginx-1
Started 0.2s
```
5. Open the terminal of the server container (mine is named `codeigniter_docker_dev-nginx-1`) and create a CodeIgniter project using `composer`:
```.sh
docker exec -it codeigniter_docker-nginx-1 bash
composer create-project codeigniter4/appstarter tmpdir
```
Move the contents of `tmpdir` into the project root:
```.sh
mv tmpdir/* . && mv tmpdir/.[!.]* . && rmdir tmpdir
```
6. Access your CodeIgniter web app at http://localhost