Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dockerbound-immortal/lepr-improved
Lumen, Nginx, Postgres, and RabbitMQ. pdo_enabled openssl_enabled mbstring_enabled openssl_enabled. Development Stack.
https://github.com/dockerbound-immortal/lepr-improved
artisan composer docker-containers nginx node13 php7 postgres11 rabbitmq3
Last synced: about 2 months ago
JSON representation
Lumen, Nginx, Postgres, and RabbitMQ. pdo_enabled openssl_enabled mbstring_enabled openssl_enabled. Development Stack.
- Host: GitHub
- URL: https://github.com/dockerbound-immortal/lepr-improved
- Owner: Dockerbound-Immortal
- Created: 2020-06-26T13:48:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T20:47:30.000Z (almost 2 years ago)
- Last Synced: 2023-10-20T08:06:56.888Z (over 1 year ago)
- Topics: artisan, composer, docker-containers, nginx, node13, php7, postgres11, rabbitmq3
- Language: PHP
- Homepage:
- Size: 1.21 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Microservices
A secondary README.md is available in the `src/` folder showing the
steps taken.# Setup
1. Ensure Docker is installed
2. Run command:
`docker volume create data-postgres`This is a workaround for an issue in which postgres does not allow
for volumes to be shared due to postgres permissions.3. `cd` into the root directory
4. Run `docker-compose up`The server will appear via the url: [http://localhost:8080](http://localhost:8080)
# Constructed Compose File
LEPP development stack.This development stack
# .env
You will need to set up a .env file in the root directory for the container to run:
- POSTGRES_DATABASE=app_db
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_ROOT_PASSWORD=rootPasswordThe name of the db must remain as `app_db` for the container to work.
# Loading init.SQL
A workaround for cases where the `init.SQL` does not run on startup.
`exec` in to the postgres container, and run the following command:
psql -d app_db -U username -a -f docker-entrypoint-initdb.d/init.sql
This will create and populate all of the database tables.
Note: `app_db` must remain the same, along with the path to `init.sql`, the username is the one you have specified in the `.env` file.
## Usage
Build Laravel file in src folder, or add php files to the "public/" directory. Run `docker-compose up -d --build` at root. Open browser to [http://localhost:8080](http://localhost:8080).
Three new available have been added that handle Composer, NPM, and Artisan commands without having to have these platforms installed on your local computer. Use the following command templates from your project root, modifiying them to fit your particular use case:
- `docker-compose run --rm composer update`
- `docker-compose run --rm npm run dev`
- `docker-compose run --rm artisan migrate`# Migrating Tables
To use artisan commands such as migrations, `exec` into the `php` container and run the command.
Note, this container does not contain bash, commands should be run as follows:
docker exec -ti php php artisan migrate
Containers created and their ports (if used) are as follows:
- **nginx** - `:8080`
- **mysql** - `:3306`
- **php** - `:9000`
- **npm**
- **composer**
- **artisan**
- **rabbitmq_management** - `:15672`
- **rabbitmq** - `:5672`