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`. diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 40e0f579..d28a2c05 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/.htaccess:/var/www/html/.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