From 1d896152e4767c55ea81ee5c4f58df69aa23123b Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 10 Nov 2024 20:58:34 +0000 Subject: [PATCH 1/3] add phpmyadmin --- docker-compose.prod.yml | 13 +++++++++++++ docker-compose.yml | 11 +++++++++++ docker/phpmyadmin/.htaccess | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 docker/phpmyadmin/.htaccess diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 40e0f579..2673c9c6 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -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/phpmyadmin.conf:/etc/apache2/conf-available/.htaccess #Docker Networks networks: app-network: diff --git a/docker-compose.yml b/docker-compose.yml index b137c4ec..4fe3a7c6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: diff --git a/docker/phpmyadmin/.htaccess b/docker/phpmyadmin/.htaccess new file mode 100644 index 00000000..c03ea94a --- /dev/null +++ b/docker/phpmyadmin/.htaccess @@ -0,0 +1,3 @@ +Order Deny,Allow +Deny from All +Allow from 1.1.1.1 \ No newline at end of file From a07ac5e136d6d4c0f588184815f4d745b4de53a2 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 11 Nov 2024 00:16:48 +0000 Subject: [PATCH 2/3] fix docker was testing on the dev one, forgot to replicate it to prod, oops --- docker-compose.prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 2673c9c6..d28a2c05 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -83,7 +83,7 @@ services: networks: - app-network volumes: - - ./docker/phpmyadmin/phpmyadmin.conf:/etc/apache2/conf-available/.htaccess + - ./docker/phpmyadmin/.htaccess:/var/www/html/.htaccess #Docker Networks networks: app-network: From 27ea82a486b6de5d2dfe9715eba5ce8d1f2f0839 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 11 Nov 2024 13:40:10 +0000 Subject: [PATCH 3/3] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d8838853..01d36245 100644 --- a/README.md +++ b/README.md @@ -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: ``` @@ -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`.