Commit Graph

21 Commits

Author SHA1 Message Date
Matt 3e5b8aa042 Remove api-nginx health check and add restart documentation
- Remove health check from api-nginx service to fix "starting" status issue
- Add UPDATED_RESTART_INSTRUCTIONS.md with detailed restart process
- Update api-nginx depends_on to use explicit service_started condition
2025-06-05 18:05:05 +02:00
Matt f04e93ddb4 Fix container health checks and expose services externally
- Replace artisan-based health check with php-fpm process check
- Change port bindings from localhost to all interfaces (0.0.0.0)
- Add restart policies to ensure service availability
- Extend API startup period from 60s to 90s
- Add comprehensive restart instructions and troubleshooting guide

This allows external access to the application and improves container
reliability by fixing health check failures.
2025-06-05 18:00:12 +02:00
Matt 3a8e601a37 Refactor nginx setup to use host-level configuration
- Remove main nginx ingress container from docker-compose
- Add minimal api-nginx container for FastCGI to HTTP conversion
- Expose services directly on ports 7654 (API) and 7655 (UI)
- Add comprehensive NGINX_SETUP.md documentation
- Include example host nginx configuration
- Update docker setup script for new architecture

This change allows OpnForm to integrate better with existing host nginx
setups by removing the containerized ingress and exposing services
directly to the host for reverse proxy configuration.
2025-06-05 17:42:01 +02:00
JhumanJ 72a87f1de8 Revert docker-compose.yml to use pre-built images - switches back from local builds to published Docker images 2025-05-27 18:17:18 +02:00
Julien Nahum f3a02df80e
Version in self hosted (#770)
* Enhance Application Version Management in Docker and Feature Flags

- Added a new build argument `APP_VERSION` in the Docker configuration files to facilitate version tracking during builds.
- Introduced a private method `getAppVersion` in `FeatureFlagsController` to retrieve the application version from the Docker environment, enhancing the feature flags response with version information.
- Updated the `app.php` configuration file to include a new entry for `docker_version`, allowing for better version management and fallback when the Docker build version is unavailable.

These changes aim to improve the application's versioning capabilities, ensuring that the version is consistently available across different components and environments.

* Refactor OpenFormFooter and Update Feature Flags Handling

- Modified `OpenFormFooter.vue` to include a version display when available, enhancing user awareness of the application version.
- Refactored the script section to use the `<script setup>` syntax, improving readability and reactivity by utilizing `ref` and `computed` for reactive properties.
- Removed the deprecated `feature-flags.js` plugin and updated `featureFlags.js` to ensure proper SSR compatibility and error handling during feature flag fetching.

These changes aim to improve the user interface by providing version information and enhance the overall code structure for better maintainability and performance.
2025-05-27 17:44:42 +02:00
Julien Nahum 5ccf400a66 Update Docker Compose Configuration for Storage Volume
- Changed the storage volume mapping in `docker-compose.yml` from a relative path (`./api/storage`) to a named volume (`opnform_storage`). This modification enhances portability and consistency across different environments by utilizing Docker's volume management, ensuring that the storage is properly managed and isolated.

This change aims to improve the Docker setup by leveraging named volumes for better data persistence and management.
2025-05-23 18:26:40 +02:00
Julien Nahum 7d7aba10b1 Refactor Docker Entrypoint and Environment Variables
- Removed the `IS_API_WORKER` environment variable from `docker-compose.yml`, simplifying the configuration for API services and aligning with the new role-based command handling.
- Updated the `php-fpm-entrypoint` script to determine the role (API, worker, or scheduler) based on the command being executed, enhancing flexibility and clarity in service initialization.
- Streamlined the setup process for different roles, ensuring that appropriate commands are executed based on the determined role, which improves maintainability and reduces potential errors.

These changes aim to enhance the Docker configuration by adopting a more dynamic approach to service roles, improving the overall deployment process.
2025-05-22 13:21:56 +02:00
Julien Nahum ae21cae8cd
Enhance Docker Configuration and Health Checks (#761)
* Enhance Docker Configuration and Health Checks

- Added PHP configuration settings in `docker-compose.dev.yml` and `docker-compose.yml` to improve memory management and execution limits, ensuring better performance for PHP applications.
- Introduced health checks for various services including `api`, `api-worker`, `api-scheduler`, `ui`, `redis`, and `db` to ensure service availability and reliability.
- Updated environment variables in `.env.docker` and `client/.env.docker` to include new keys for H-Captcha and reCAPTCHA, enhancing security features.
- Refactored the PHP-FPM entrypoint script to apply PHP configurations dynamically based on environment variables, improving flexibility in deployment.
- Removed outdated PHP configuration files to streamline the Docker setup.

These changes aim to enhance the overall stability, performance, and security of the application in a Dockerized environment.

* Refactor Dockerfile for Improved Build Process

- Changed the Dockerfile to utilize a multi-stage build approach, separating the build and runtime environments for better efficiency.
- Introduced a builder stage using the PHP CLI image to install dependencies and extensions, optimizing the final image size.
- Removed unnecessary installation steps and combined related commands to streamline the Dockerfile, enhancing readability and maintainability.
- Updated the runtime stage to use the PHP FPM Alpine image, ensuring a smaller and more secure production environment.

These changes aim to improve the build process, reduce image size, and enhance the overall performance of the Dockerized application.
2025-05-20 19:20:44 +02:00
JhumanJ 0dfec52cf8 Refactor Docker Configuration and Enhance Build Process
- Removed the build context and Dockerfile specification from the `docker-compose.dev.yml` and `docker-compose.yml` files for the `ui` service, streamlining the configuration.
- Increased Node memory limit in the `Dockerfile.client` to prevent out of memory errors during the build process, ensuring smoother builds and improved performance.

These changes aim to simplify the Docker setup and enhance the reliability of the build process for the client application.
2025-05-15 20:21:36 +02:00
Julien Nahum 932585b9d3 Remove bootstrap cache volume from docker-compose.yml
Simplify Docker configuration by removing an unnecessary volume mapping for the Laravel bootstrap cache directory
2025-01-29 21:45:50 +01:00
Julien Nahum 44a4b983d5 Simplify Docker development setup with minimal configuration
- Remove Redis, queue workers, and scheduler from development environment
- Update docker-compose.dev.yml with simplified service configurations
- Modify Dockerfile.api to support flexible dependency installation
- Update docker-setup.sh script to use single compose file
- Revise Docker development documentation to reflect new lightweight approach
2025-01-29 18:44:42 +01:00
Julien Nahum f7df6bc0d7 Refactor Docker configuration and development setup
- Update .dockerignore with comprehensive ignore patterns for API and client
- Modify docker-compose files to improve service configurations
- Enhance Nginx configuration for development and production environments
- Refactor Dockerfile.api with improved build process
- Add docker-setup.sh script for simplified Docker deployment
- Update update-credentials.vue page with improved UI
- Remove hCaptcha dependency from package-lock.json
- Update PHP configuration and entrypoint scripts
2025-01-29 17:19:36 +01:00
Julien Nahum bf85d8fa76
Developer docker setup (#683)
* Add build context to compose

Signed-off-by: Daniel Ekman <knegge@gmail.com>

* Update Docker documentation with build instructions

Enhance Docker deployment documentation by:
- Adding detailed instructions for building Docker images
- Providing two methods for image building (Docker Compose and manual)
- Clarifying how to use local images with docker-compose.override.yml

* Add development Docker configuration

Introduce development-specific Docker configuration:
- Create docker-compose.dev.yml for local development setup
- Add nginx.dev.conf with development CORS settings
- Update Dockerfile.api to support environment-specific dependency installation
- Configure development services with appropriate volumes and environment variables

* Improve Docker and Development Documentation

- Remove platform-specific ARM64 constraints in docker-compose.dev.yml
- Enhance Nginx configuration with improved proxy and HMR settings
- Update documentation for development setup and Docker deployment
- Add new Docker development documentation page
- Refactor getting started guide with clearer development instructions

* Enhance Docker configuration and CI/CD pipeline

- Update Docker Compose files with improved service configurations
- Add database healthcheck in docker-compose.yml
- Refactor GitHub Actions workflow for Docker image publishing
- Optimize Dockerfile.api with multi-stage build and environment-specific configurations
- Update Nginx configuration for development and production environments

* Add GitHub Actions permissions for Docker image publishing

Configure GitHub Actions workflow with explicit read and write permissions for content and packages to improve security and clarity of Docker image deployment process

---------

Signed-off-by: Daniel Ekman <knegge@gmail.com>
Co-authored-by: Daniel Ekman <knegge@gmail.com>
2025-01-28 17:52:48 +01:00
Daniel Ekman ae74f33a27
Add build context to compose (#680)
* Add build context to compose

Signed-off-by: Daniel Ekman <knegge@gmail.com>

* Update Docker documentation with build instructions

Enhance Docker deployment documentation by:
- Adding detailed instructions for building Docker images
- Providing two methods for image building (Docker Compose and manual)
- Clarifying how to use local images with docker-compose.override.yml

---------

Signed-off-by: Daniel Ekman <knegge@gmail.com>
Co-authored-by: Julien Nahum <julien@nahum.net>
2025-01-28 12:56:01 +01:00
Julien Nahum e3eacf1e23 Fix Docker api issues 2024-08-28 17:20:17 +02:00
Julien Nahum 5bd1dda504
Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
Julien Nahum fd9067b470
518 setup env command (#519)
* Created command and cleaned

* Simplified docker setup, created script to generate .env

* add git ignore file back
2024-08-08 16:33:01 +02:00
ash 797c1ceab5
Fix UI image type (#516)
Co-authored-by: Julien Nahum <julien@nahum.net>
2024-08-06 10:28:13 +02:00
Julien Nahum 3280e38ee1
Docker compose setup (#513)
* fix password reset bug

* self hosted mode middleware changes on  pages

* fix lint

* wip: self hosted changes

* wip: self hosted frontend changes

* wip self hosted mode changes

* typo correction

* remove commented logic

* fix env variable names

* fix lint issues

* fix minor updates

* #445 Switched from single monolithic docker image to a docker-compose
 orchestrated network of services

* Automatically configures shared secret

* Working through some issues

* Use local file storage

* Moved the dockerfiles

* Fixed some issues when building from clean

* Corrected workflow

* Hopefully schedules everything correctly now

* Prep storage for worker process as well

* .env files are required

* Pinned dependency versions

* Disable self hosted in the client as well

* Removed double defaulting logic

* Using regexs is more succinct

* Added FRONT_URL environment variable

* Merge 236e4-self-hosted-mode-changes

* Improve inital user setup

* Finalized the new docker-compose setup

* Fix back-end formatting issues

---------

Co-authored-by: Frank <csskfaves@gmail.com>
Co-authored-by: Don Benjamin <don@webhammer.co.uk>
2024-08-05 12:06:20 +02:00
Don Benjamin 8f84faf3d1
(#146) Re-wrote the docker code to generate a single self-contained d… (#153)
* (#146) Re-wrote the docker code to generate a single self-contained docker
image rather than using a docker-compose network of connected
containers

* (#146) Push version tags to docker hub automatically

* (#146) Switched to using a multistage docker build process to make the Dockerfile more readable and cache friendly without bloating the published image

* #146 More readable names

* #146 Documented the upgrade process and made 'artisan migrate' run on every boot to automate the upgrade process.
2023-07-27 11:34:19 +02:00
Philip Gatzka 49d1a237ef
Add docker compose setup (#73)
* Add docker compose setup

* Shorten healthcheck interval for faster startup

* Add .env file for docker setup. Take changes in composer/package-lock into account.

* Add readme entry

* JWT force command + readme minor changes

* Udpated readme

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2023-02-22 19:13:32 +01:00