Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update instructions #319

Merged
merged 3 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
services:
laravel-prod:
container_name: laravel-prod
build:
dockerfile: docker/DockerfileBackendProd
backend:
container_name: backend
image: enaccess/micropowermanager-backend:latest
depends_on:
- maria
- redis
Expand All @@ -13,10 +12,9 @@ services:
- 8000:80
- 8443:443

ui-prod:
container_name: ui-prod
build:
dockerfile: docker/DockerfileFrontendProd
frontend:
container_name: frontend
image: enaccess/micropowermanager-frontend:latest
ports:
- 8001:8081
volumes:
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
laravel-dev:
container_name: laravel-dev
backend-dev:
container_name: backend-dev
build:
dockerfile: docker/DockerfileBackendDev
depends_on:
Expand All @@ -15,8 +15,8 @@ services:
volumes:
- ./src/backend:/var/www/html

ui-dev:
container_name: ui-dev
frontend-dev:
container_name: frontend-dev
build:
dockerfile: docker/DockerfileFrontendDev
ports:
Expand Down
2 changes: 1 addition & 1 deletion docs/development/backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ automatically. If you prefer to install dependencies manually or need to add add
1. Enter the Docker container named "laravel":

```bash
docker exec -it laravel-dev bash
docker exec -it backend-dev bash
```

2. Run the following command to install dependencies, replacing {package-name} with the actual name of the package:
Expand Down
27 changes: 0 additions & 27 deletions docs/development/build-for-production.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/development/development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Before proceeding, ensure you can open a terminal (Terminal app on macOS, termin
When you run the application for the first time, you need to run the following command to initialize the databases and load Demo data:

```bash
docker exec -it laravel-dev bash
docker exec -it backend-dev bash
php artisan migrate --seed
```

Expand Down Expand Up @@ -90,7 +90,7 @@ It can be run multiple times to generate more data as required.
If you wish reset the Demo data setup to the default setup run:

```sh
docker exec -it laravel-dev bash
docker exec -it backend-dev bash
php artisan migrate-tenant:drop-demo-company
php artisan migrate:fresh --seed
```
Expand Down
8 changes: 4 additions & 4 deletions docs/development/multitenancy.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ with data exclusive to their company, providing a personalized and secure experi
When creating a migration file, you need to use the following command:

```bash
docker exec -it laravel-dev bash
docker exec -it backend-dev bash
php artisan migrator:create {migration-name}
```

Expand All @@ -50,7 +50,7 @@ This command creates a migration file in Micropower Manager's core migration fil
After creating the migration file, you can shift it to other company databases using the following command:

```bash
docker exec -it laravel-dev bash
docker exec -it backend-dev bash
php artisan migrator:copy
```

Expand All @@ -59,13 +59,13 @@ This command syncs the migration files in the core migration folder for other co
To migrate the database, use the following command:

```bash
docker exec -it laravel-dev bash
docker exec -it backend-dev bash
php artisan migrator:migrate
```

Alternatively, you can migrate the database for a specific company using the following command:

```bash
docker exec -it laravel-dev bash
docker exec -it backend-dev bash
php shard:migrate {company_id} {--force}
```
2 changes: 1 addition & 1 deletion docs/development/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In the backend section, you'll find instructions on how to create a plugin.
We have a custom plugin creator command that generates a template. Use the following command to create a new plugin:

```bash
docker exec -it laravel-dev bash
docker exec -it backend-dev bash
php artisan micropowermanager:new-package {package-name}
```

Expand Down
24 changes: 24 additions & 0 deletions docs/installation/deploy-production.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
order: 4
---

# Deploy for Production

The MicroPowerManager is distributed as pre-compile Docker images via [DockerHub](https://hub.docker.com/).

For running a self-hosted version of MicroPowerManager multiple options exists as explained in the following.

## Docker Compose

A working environment running with production containers can be achieved by running:

```sh
docker compose -f docker-compose-prod.yml up
```

## Kubernetes

> [!NOTE]
> This section will be expanded in the future.

A working sample of Kubernetes manifest files that are used to run the [MPM Demo Version](https://demo.micropowermanager.io/#/login) can be found in the `k8s` directory of this repository.
19 changes: 0 additions & 19 deletions docs/installation/deployproduction.md

This file was deleted.

Loading