Beautiful Open-Source Form Builder
Refactor Docker Configuration and Enhance Build Process
JhumanJ0dfec52cf886
diff --git a/docker-compose.dev.yml b/docker-compose.dev.ymlindex 360847699..7b85cbef5 100644--- a/docker-compose.dev.yml+++ b/docker-compose.dev.yml@@ -4,12 +4,6 @@ services:api:image: jhumanj/opnform-api:devcontainer_name: opnform-api- build:- context: .- dockerfile: docker/Dockerfile.api- args:- APP_ENV: local- COMPOSER_FLAGS: ""volumes:- ./api:/usr/share/nginx/html:delegated- /usr/share/nginx/html/vendor # Exclude vendor directory from the mount@@ -44,9 +38,6 @@ services:ui:image: jhumanj/opnform-client:devcontainer_name: opnform-client- build:- context: .- dockerfile: docker/Dockerfile.clientcommand: sh -c "npm install && NITRO_HOST=0.0.0.0 NITRO_PORT=3000 npm run dev"volumes:- ./client:/app:delegateddiff --git a/docker-compose.yml b/docker-compose.ymlindex 78cc3d33d..22402e962 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -3,12 +3,6 @@ services:api: &api-environmentimage: jhumanj/opnform-api:latestcontainer_name: opnform-api- build: &api-build- context: .- dockerfile: docker/Dockerfile.api- args:- APP_ENV: production- COMPOSER_FLAGS: --no-devvolumes: &api-environment-volumes- ./api/storage:/usr/share/nginx/html/storage:rwenvironment: &api-env@@ -35,7 +29,6 @@ services:api-worker:<<: *api-environmentcontainer_name: opnform-api-worker- build: *api-buildcommand: ["php", "artisan", "queue:work"]volumes: *api-environment-volumesenvironment:@@ -48,7 +41,6 @@ services:api-scheduler:<<: *api-environmentcontainer_name: opnform-api-scheduler- build: *api-buildcommand: ["php", "artisan", "schedule:work"]volumes: *api-environment-volumesenvironment:@@ -65,9 +57,6 @@ services:ui:image: jhumanj/opnform-client:latestcontainer_name: opnform-client- build:- context: .- dockerfile: docker/Dockerfile.clientenv_file:- ./client/.envdiff --git a/docker/Dockerfile.client b/docker/Dockerfile.clientindex 846ee3680..eac0d7859 100644--- a/docker/Dockerfile.client+++ b/docker/Dockerfile.client@@ -20,7 +20,8 @@ RUN npm cache clean --force && \# RUN npm install [email protected]ADD ./client/ /app/-RUN npm run build+# Increase Node memory limit to prevent out of memory error during build+RUN NODE_OPTIONS="--max-old-space-size=4096" npm run buildFROM node:20-alpineWORKDIR /app