From dfa7986440b176bb6e64644dc16541433bcc478b Mon Sep 17 00:00:00 2001 From: Matt Daniels Date: Mon, 11 Sep 2023 16:24:04 +1000 Subject: [PATCH 1/4] Update readme to include local use instructions --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index a0ec099..979e938 100644 --- a/README.md +++ b/README.md @@ -1 +1,23 @@ # webdev docker build file + + +## Using 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). From 6c26494dcb8b392085cd5fc4c7843118db834100 Mon Sep 17 00:00:00 2001 From: Matt Daniels Date: Mon, 11 Sep 2023 16:24:54 +1000 Subject: [PATCH 2/4] Update readme to include local use instructions --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 979e938..e564ecb 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,12 @@ ## 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) From 12a4976ee1fe700c4440d601fe008357f16179a8 Mon Sep 17 00:00:00 2001 From: Matt Daniels Date: Mon, 11 Sep 2023 16:26:33 +1000 Subject: [PATCH 3/4] Update readme to include local use instructions --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e564ecb..af29b6b 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,14 @@ To use these containers locally, they will need to be built & tagged into images 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 + * `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 + * `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) From cf66604ae9f750d295abfc437a17db2fe82ae058 Mon Sep 17 00:00:00 2001 From: vlad_aksonov Date: Tue, 12 Sep 2023 02:52:06 +0300 Subject: [PATCH 4/4] Fix --- lap-wildcard/apache-foreground.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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