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

Add database management #445

Merged
merged 3 commits into from
Nov 11, 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
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ For local development you can run the default docker-compose file that is includ
```
$ docker compose up -d
```
> Note: The default setup binds to ports 80/443. Modify `docker-compose.yml` if needed.
> Note: The default setup binds to ports 80/443. Modify `docker-compose.yml` if needed. PhpMyAdmin is also included for database management and is bound to port 8080. Modify docker-compose.yml if needed.



4. Access the "ogame-app" Docker container:
```
Expand Down Expand Up @@ -210,6 +212,9 @@ You should review all settings before deploying this project to a publicly acces
$ php artisan migrate --force
$ php artisan cache:clear && php artisan config:cache && php artisan route:cache && php artisan view:cache
```
> Note: The default setup binds to ports 80/443. PhpMyAdmin is also included for database management and is bound to port 8080, however to access it you need to explicitly specify your IP addresses via ./docker/phpmyadmin/.htaccess for safety purposes. Modify docker-compose.yml or .htaccess if needed.



After completing the setup, visit https://localhost to access OGameX. You first need to create an account (no email validation), afterwards you can login using that account.
> Note: The production version runs in forced-HTTPS (redirect) mode by default using a self-signed SSL certificate. If you want to access the application via HTTP, open `.env` and change `APP_ENV` from `production` to `local`.
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ services:
networks:
- app-network

#PHPMYADMIN
phpmyadmin:
image: phpmyadmin
restart: always
ports:
- 8080:80
environment:
- PMA_ARBITRARY=1
- PMA_HOST=ogame-db
networks:
- app-network
volumes:
- ./docker/phpmyadmin/.htaccess:/var/www/html/.htaccess
#Docker Networks
networks:
app-network:
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ services:
networks:
- app-network

#PHPMYADMIN
phpmyadmin:
image: phpmyadmin
restart: always
ports:
- 8080:80
environment:
- PMA_ARBITRARY=1
- PMA_HOST=ogame-db
networks:
- app-network
#Docker Networks
networks:
app-network:
Expand Down
3 changes: 3 additions & 0 deletions docker/phpmyadmin/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Order Deny,Allow
Deny from All
Allow from 1.1.1.1
Loading