diff --git a/README.md b/README.md index a0ec099..af29b6b 100644 --- a/README.md +++ b/README.md @@ -1 +1,29 @@ # webdev docker build file + + +## Using Locally + +### Running locally + +TODO + +### Building Containers locally + +To use these containers locally, they will need to be built & tagged into images first. + +1. Start with the [./lap/Dockerfile](./lap/Dockerfile) +2. Build the image - options to build are: + * `docker build -t xpon/webdev_local:latest .` + * VSCode or another IDE - often, you can right-click on the Dockerfile & choose "build" - make sure you keep track of the image name it gives it +3. In the above command, `xpon/webdev_local` is the image name and `latest` is the tag +4. Next, edit the [./lap-wildcard/Dockerfile](./lap-wildcard/Dockerfile) +5. Change the first line from `FROM internetrix/webdev:lap` to `FROM xpon/webdev_local:latest` (or whatever your image is called from step 2 above - use `docker images` to list them or use the Docker UI in your OS to see what images and their names you have) +6. Build this image - options to build are: + * `docker build -t xpon/webdev_wildcard_local:latest .` + * VSCode or another IDE - often, you can right-click on the Dockerfile & choose "build" - make sure you keep track of the image name it gives it +7. Next edit the [./docker-compose.yml](./docker-compose.yml) +8. Change the `image` reference in the `web` service to reflect the newly built image - change from: `image: internetrix/webdev:lap-wildcard` to `image: xpon/webdev_wildcard_local:latest` +9. Rebuild the docker compose service: `docker compose up --force-recreate` (you likely do not need the force-recreate, but best to do so) + + +If you have any problems, it may be worthwhile deleting all other containers both running and stopped (use `docker ps -a` to show all & `docker rm {container name}` to delete them). diff --git a/lap-wildcard/apache-foreground.sh b/lap-wildcard/apache-foreground.sh index e846cb1..2dade19 100644 --- a/lap-wildcard/apache-foreground.sh +++ b/lap-wildcard/apache-foreground.sh @@ -81,7 +81,7 @@ sed -i '/#phpmyadminhandlerstart/,/#phpmyadminhandlerend/{//!d}' /etc/apache2/co if [ "$WEBDEV_ENABLE_PHP_82_FPM" = 1 ]; then echo "==============Setting phpMyAdmin handler to 8.2 ..." sed -i '/#phpmyadminhandlerstart/a SetHandler "proxy:unix:/run/php/php8.2-fpm.sock|fcgi://localhost"' /etc/apache2/conf-enabled/phpmyadmin.conf -if [ "$WEBDEV_ENABLE_PHP_81_FPM" = 1 ]; then +elif [ "$WEBDEV_ENABLE_PHP_81_FPM" = 1 ]; then echo "==============Setting phpMyAdmin handler to 8.1 ..." sed -i '/#phpmyadminhandlerstart/a SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost"' /etc/apache2/conf-enabled/phpmyadmin.conf elif [ "$WEBDEV_ENABLE_PHP_80_FPM" = 1 ]; then