Add compose file as production instruction
This commit is contained in:
parent
9aaae974d6
commit
861d469082
1 changed files with 61 additions and 11 deletions
70
README.md
70
README.md
|
|
@ -44,24 +44,74 @@ ## Getting Started
|
||||||
|
|
||||||
### Quick Start (Production)
|
### Quick Start (Production)
|
||||||
|
|
||||||
Run the application using Docker Compose:
|
#### Docker
|
||||||
|
|
||||||
|
Create a `docker-compose.yml` file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: codeberg.org/lvl0/incr:0.1.14
|
||||||
|
container_name: incr-app
|
||||||
|
restart: unless-stopped
|
||||||
|
working_dir: /var/www/html
|
||||||
|
environment:
|
||||||
|
- APP_ENV=production
|
||||||
|
- APP_DEBUG=false
|
||||||
|
- DB_CONNECTION=mysql
|
||||||
|
- DB_HOST=db
|
||||||
|
- DB_PORT=3306
|
||||||
|
- DB_DATABASE=incr
|
||||||
|
- DB_USERNAME=incr_user
|
||||||
|
- DB_PASSWORD=incr_password
|
||||||
|
volumes:
|
||||||
|
- ./storage:/var/www/html/storage
|
||||||
|
- ./public:/var/www/html/public
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
networks:
|
||||||
|
- incr-network
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: mysql:8.0
|
||||||
|
container_name: incr-db
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- MYSQL_DATABASE=incr
|
||||||
|
- MYSQL_USER=incr_user
|
||||||
|
- MYSQL_PASSWORD=incr_password
|
||||||
|
- MYSQL_ROOT_PASSWORD=root_password
|
||||||
|
volumes:
|
||||||
|
- db_data:/var/lib/mysql
|
||||||
|
ports:
|
||||||
|
- "3306:3306"
|
||||||
|
networks:
|
||||||
|
- incr-network
|
||||||
|
|
||||||
|
networks:
|
||||||
|
incr-network:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db_data:
|
||||||
|
driver: local
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone the repository
|
docker compose up -d
|
||||||
git clone https://codeberg.org/lvl0/incr.git
|
|
||||||
cd incr
|
|
||||||
|
|
||||||
# Start the application
|
|
||||||
docker compose -f docker/docker-compose.yml up -d
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The application will be available at `http://localhost`.
|
The application will be available at `http://localhost`.
|
||||||
|
|
||||||
**Default credentials**: You'll need to register a new account on first visit.
|
**Default credentials**: You'll need to register a new account on first visit.
|
||||||
|
|
||||||
## Development
|
### Development
|
||||||
|
|
||||||
### Local Development Setup
|
#### Local Development Setup
|
||||||
|
|
||||||
For local development with Laravel Sail:
|
For local development with Laravel Sail:
|
||||||
|
|
||||||
|
|
@ -83,7 +133,7 @@ # Run migrations
|
||||||
|
|
||||||
The development server will be available at `http://localhost` with hot reload enabled.
|
The development server will be available at `http://localhost` with hot reload enabled.
|
||||||
|
|
||||||
### Project Structure
|
## Project Structure
|
||||||
|
|
||||||
- `app/` - Laravel backend (controllers, models, services)
|
- `app/` - Laravel backend (controllers, models, services)
|
||||||
- `resources/js/` - React frontend components and pages
|
- `resources/js/` - React frontend components and pages
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue