-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d0f592
commit f657440
Showing
34 changed files
with
1,735 additions
and
2,991 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ RUN composer install \ | |
--prefer-dist | ||
|
||
#Image | ||
FROM phpswoole/swoole:5.0-php8.1-alpine as base | ||
FROM phpswoole/swoole:5.0-php8.2-alpine as base | ||
LABEL authors="David Smith <[email protected]>" | ||
|
||
RUN docker-php-ext-install bcmath && \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,6 @@ MicroGuard is a robust web-based management tool designed to streamline the hand | |
- **Access Control**: Easily grant or revoke access for individual clients. | ||
- **Google SSO**: Secure sign-in using Google's Single Sign-On system. | ||
|
||
> **Note**: Comprehensive SSO setup details will be provided soon. | ||
## Requirements | ||
|
||
- MikroTik router with RouterOS version 7.0 or newer. | ||
|
@@ -97,15 +95,15 @@ docker run -d | |
-e ROUTEROS_WIREGUARD_INTERFACE='wireguard' #wireguard interface name | ||
-e ROUTEROS_WIREGUARD_ENDPOINT='192.168.0.1:13231' #ip:port for wireguard interface | ||
-e APP_URL='https://my.public.address' | ||
ghcr.io/xterm-inator/microguard:master | ||
ghcr.io/xterm-inator/microguard:latest | ||
```` | ||
|
||
**Docker Compose**: | ||
```yml | ||
version: '3.8' | ||
services: | ||
microguard: | ||
image: ghcr.io/xterm-inator/microguard:master | ||
image: ghcr.io/xterm-inator/microguard:latest | ||
container_name: microguard | ||
restart: always | ||
ports: | ||
|
@@ -146,34 +144,52 @@ To facilitate local development and testing, we've incorporated Docker Compose. | |
1. Clone the Repository: | ||
Use Git to clone the MicroGuard repository to your local machine: | ||
```bash | ||
git clone https://github.com/your-repo-link/microguard.git | ||
git clone git@github.com:xterm-inator/microguard.git | ||
# Navigate into the repository directory: | ||
cd microguard | ||
``` | ||
2. Set Up Environment Variables: | ||
Before starting the services using Docker Compose, you may need to configure some environment variables. Copy the sample environment file and adjust the settings as necessary: | ||
```shell | ||
```bash | ||
cp api/.env.example .env | ||
``` | ||
Edit the .env file with appropriate values. Make sure to generate and set values for necessary keys, especially those related to Google SSO, and MikroTik configurations. | ||
Edit the .env file with appropriate values. Make sure to generate and set values for necessary keys. | ||
3. Build Containers: | ||
```bash | ||
docker compose build --parallel | ||
``` | ||
4. Install Dependencies: | ||
Using docker run there are some dependencies that need to be setup: | ||
```bash | ||
docker compose run api composer install | ||
docker compose run api npm i | ||
docker compose run api php artisan key:generate | ||
docker compose run api php artisan migrate | ||
docker compose run vue npm i | ||
``` | ||
5. Create an Initial User: | ||
```bash | ||
docker compose run api php artisan app:create-user [email protected] admin | ||
``` | ||
3. Run with Docker Compose: | ||
6. Run with Docker Compose: | ||
Start the MicroGuard stack using Docker Compose: | ||
```shell | ||
```bash | ||
docker compose up | ||
``` | ||
This will build and start all necessary containers. Once done, the MicroGuard interface should be accessible at http://localhost:8000 or another port if you've adjusted the configuration. | ||
This will build and start all necessary containers. Once done, the MicroGuard interface should be accessible at http://localhost:3000. | ||
4. Shutdown and Cleanup: | ||
7. Shutdown and Cleanup: | ||
When you're done with local development/testing, you can stop the Docker Compose services: | ||
|
||
```shell | ||
```bash | ||
docker compose down | ||
``` | ||
|
||
This setup should provide an isolated environment for development and testing without affecting any production data or configurations. | ||
## Contributing | ||
Contribute to MicroGuard by submitting a pull request or issue on GitHub. We welcome bug reports, feature suggestions, and code enhancements from the community. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,17 @@ | ||
APP_NAME=Laravel | ||
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=true | ||
APP_URL=http://localhost | ||
|
||
LOG_CHANNEL=stack | ||
LOG_DEPRECATIONS_CHANNEL=null | ||
LOG_LEVEL=debug | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_DATABASE=api | ||
DB_USERNAME=root | ||
DB_PASSWORD= | ||
|
||
BROADCAST_DRIVER=log | ||
CACHE_DRIVER=file | ||
FILESYSTEM_DISK=local | ||
QUEUE_CONNECTION=sync | ||
SESSION_DRIVER=file | ||
SESSION_LIFETIME=120 | ||
|
||
MEMCACHED_HOST=127.0.0.1 | ||
|
||
REDIS_HOST=127.0.0.1 | ||
REDIS_PASSWORD=null | ||
REDIS_PORT=6379 | ||
|
||
MAIL_MAILER=smtp | ||
MAIL_HOST=mailhog | ||
MAIL_PORT=1025 | ||
MAIL_USERNAME=null | ||
MAIL_PASSWORD=null | ||
MAIL_ENCRYPTION=null | ||
MAIL_FROM_ADDRESS="[email protected]" | ||
MAIL_FROM_NAME="${APP_NAME}" | ||
|
||
AWS_ACCESS_KEY_ID= | ||
AWS_SECRET_ACCESS_KEY= | ||
AWS_DEFAULT_REGION=us-east-1 | ||
AWS_BUCKET= | ||
AWS_USE_PATH_STYLE_ENDPOINT=false | ||
ROUTEROS_HOST=192.168.0.1 | ||
ROUTEROS_PORT=8728 | ||
ROUTEROS_USER=wireguard | ||
ROUTEROS_PASS=wireguard-pass | ||
|
||
PUSHER_APP_ID= | ||
PUSHER_APP_KEY= | ||
PUSHER_APP_SECRET= | ||
PUSHER_HOST= | ||
PUSHER_PORT=443 | ||
PUSHER_SCHEME=https | ||
PUSHER_APP_CLUSTER=mt1 | ||
ROUTEROS_WIREGUARD_INTERFACE=wireguard | ||
ROUTEROS_WIREGUARD_ENDPOINT=192.168.0.1:13231 | ||
|
||
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" | ||
VITE_PUSHER_HOST="${PUSHER_HOST}" | ||
VITE_PUSHER_PORT="${PUSHER_PORT}" | ||
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" | ||
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" | ||
GOOGLE_CLIENT_ID= | ||
GOOGLE_CLIENT_SECRET= | ||
GOOGLE_REDIRECT_URL=http://localhost:8000/api/auth/oauth/google/callback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.