diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 36084769..7b85cbef 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -4,12 +4,6 @@ services: api: image: jhumanj/opnform-api:dev container_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:dev container_name: opnform-client - build: - context: . - dockerfile: docker/Dockerfile.client command: sh -c "npm install && NITRO_HOST=0.0.0.0 NITRO_PORT=3000 npm run dev" volumes: - ./client:/app:delegated diff --git a/docker-compose.yml b/docker-compose.yml index 78cc3d33..22402e96 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,12 +3,6 @@ services: api: &api-environment image: jhumanj/opnform-api:latest container_name: opnform-api - build: &api-build - context: . - dockerfile: docker/Dockerfile.api - args: - APP_ENV: production - COMPOSER_FLAGS: --no-dev volumes: &api-environment-volumes - ./api/storage:/usr/share/nginx/html/storage:rw environment: &api-env @@ -35,7 +29,6 @@ services: api-worker: <<: *api-environment container_name: opnform-api-worker - build: *api-build command: ["php", "artisan", "queue:work"] volumes: *api-environment-volumes environment: @@ -48,7 +41,6 @@ services: api-scheduler: <<: *api-environment container_name: opnform-api-scheduler - build: *api-build command: ["php", "artisan", "schedule:work"] volumes: *api-environment-volumes environment: @@ -65,9 +57,6 @@ services: ui: image: jhumanj/opnform-client:latest container_name: opnform-client - build: - context: . - dockerfile: docker/Dockerfile.client env_file: - ./client/.env diff --git a/docker/Dockerfile.client b/docker/Dockerfile.client index 846ee368..eac0d785 100644 --- a/docker/Dockerfile.client +++ b/docker/Dockerfile.client @@ -20,7 +20,8 @@ RUN npm cache clean --force && \ # RUN npm install esbuild@0.21.5 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 build FROM node:20-alpine WORKDIR /app