2024-08-05 12:06:20 +02:00
|
|
|
services:
|
2025-06-05 17:42:01 +02:00
|
|
|
api:
|
2025-05-27 18:17:18 +02:00
|
|
|
image: jhumanj/opnform-api:latest
|
2025-01-29 16:00:01 +01:00
|
|
|
container_name: opnform-api
|
2025-06-05 17:42:01 +02:00
|
|
|
volumes:
|
2025-05-23 18:26:40 +02:00
|
|
|
- opnform_storage:/usr/share/nginx/html/storage:rw
|
2025-06-05 17:42:01 +02:00
|
|
|
environment:
|
2025-01-29 16:00:01 +01:00
|
|
|
APP_ENV: production
|
|
|
|
|
# Database settings
|
2024-08-05 12:06:20 +02:00
|
|
|
DB_HOST: db
|
|
|
|
|
REDIS_HOST: redis
|
|
|
|
|
DB_DATABASE: ${DB_DATABASE:-forge}
|
|
|
|
|
DB_USERNAME: ${DB_USERNAME:-forge}
|
|
|
|
|
DB_PASSWORD: ${DB_PASSWORD:-forge}
|
|
|
|
|
DB_CONNECTION: ${DB_CONNECTION:-pgsql}
|
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
|
|
|
# PHP Configuration
|
|
|
|
|
PHP_MEMORY_LIMIT: "1G"
|
|
|
|
|
PHP_MAX_EXECUTION_TIME: "600"
|
|
|
|
|
PHP_UPLOAD_MAX_FILESIZE: "64M"
|
|
|
|
|
PHP_POST_MAX_SIZE: "64M"
|
|
|
|
|
env_file:
|
2025-01-29 16:00:01 +01:00
|
|
|
- ./api/.env
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
redis:
|
2025-06-05 17:42:01 +02:00
|
|
|
condition: service_healthy
|
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
|
|
|
healthcheck:
|
2025-06-05 18:00:12 +02:00
|
|
|
test: ["CMD-SHELL", "pgrep php-fpm > /dev/null || exit 1"]
|
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
|
|
|
interval: 30s
|
|
|
|
|
timeout: 15s
|
|
|
|
|
retries: 3
|
2025-06-05 18:00:12 +02:00
|
|
|
start_period: 90s
|
|
|
|
|
restart: unless-stopped
|
2024-08-05 12:06:20 +02:00
|
|
|
|
2025-06-05 17:42:01 +02:00
|
|
|
api-nginx:
|
|
|
|
|
image: nginx:alpine
|
|
|
|
|
container_name: opnform-api-nginx
|
|
|
|
|
volumes:
|
|
|
|
|
- ./docker/api-nginx.conf:/etc/nginx/nginx.conf:ro
|
|
|
|
|
- opnform_storage:/usr/share/nginx/html/storage:ro
|
|
|
|
|
ports:
|
2025-06-05 18:00:12 +02:00
|
|
|
- "0.0.0.0:7654:80" # API on port 7654 - accessible from any IP
|
2025-06-05 17:42:01 +02:00
|
|
|
depends_on:
|
2025-06-05 18:05:05 +02:00
|
|
|
api:
|
|
|
|
|
condition: service_started
|
2025-06-05 18:00:12 +02:00
|
|
|
restart: unless-stopped
|
2025-06-05 17:42:01 +02:00
|
|
|
|
2024-08-05 12:06:20 +02:00
|
|
|
api-worker:
|
2025-06-05 17:42:01 +02:00
|
|
|
image: jhumanj/opnform-api:latest
|
2025-01-29 16:00:01 +01:00
|
|
|
container_name: opnform-api-worker
|
|
|
|
|
command: ["php", "artisan", "queue:work"]
|
2025-06-05 17:42:01 +02:00
|
|
|
volumes:
|
|
|
|
|
- opnform_storage:/usr/share/nginx/html/storage:rw
|
2024-08-28 17:20:17 +02:00
|
|
|
environment:
|
2025-01-29 16:00:01 +01:00
|
|
|
APP_ENV: production
|
2025-06-05 17:42:01 +02:00
|
|
|
# Database settings
|
|
|
|
|
DB_HOST: db
|
|
|
|
|
REDIS_HOST: redis
|
|
|
|
|
DB_DATABASE: ${DB_DATABASE:-forge}
|
|
|
|
|
DB_USERNAME: ${DB_USERNAME:-forge}
|
|
|
|
|
DB_PASSWORD: ${DB_PASSWORD:-forge}
|
|
|
|
|
DB_CONNECTION: ${DB_CONNECTION:-pgsql}
|
|
|
|
|
# PHP Configuration
|
|
|
|
|
PHP_MEMORY_LIMIT: "1G"
|
|
|
|
|
PHP_MAX_EXECUTION_TIME: "600"
|
|
|
|
|
PHP_UPLOAD_MAX_FILESIZE: "64M"
|
|
|
|
|
PHP_POST_MAX_SIZE: "64M"
|
|
|
|
|
env_file:
|
|
|
|
|
- ./api/.env
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
redis:
|
|
|
|
|
condition: service_healthy
|
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
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pgrep -f 'php artisan queue:work' > /dev/null || exit 1"]
|
|
|
|
|
interval: 60s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 3
|
|
|
|
|
start_period: 30s
|
2025-01-29 16:00:01 +01:00
|
|
|
|
|
|
|
|
api-scheduler:
|
2025-06-05 17:42:01 +02:00
|
|
|
image: jhumanj/opnform-api:latest
|
2025-01-29 16:00:01 +01:00
|
|
|
container_name: opnform-api-scheduler
|
|
|
|
|
command: ["php", "artisan", "schedule:work"]
|
2025-06-05 17:42:01 +02:00
|
|
|
volumes:
|
|
|
|
|
- opnform_storage:/usr/share/nginx/html/storage:rw
|
2025-01-29 16:00:01 +01:00
|
|
|
environment:
|
|
|
|
|
APP_ENV: production
|
2025-06-05 17:42:01 +02:00
|
|
|
# Database settings
|
|
|
|
|
DB_HOST: db
|
|
|
|
|
REDIS_HOST: redis
|
|
|
|
|
DB_DATABASE: ${DB_DATABASE:-forge}
|
|
|
|
|
DB_USERNAME: ${DB_USERNAME:-forge}
|
|
|
|
|
DB_PASSWORD: ${DB_PASSWORD:-forge}
|
|
|
|
|
DB_CONNECTION: ${DB_CONNECTION:-pgsql}
|
|
|
|
|
# PHP Configuration
|
|
|
|
|
PHP_MEMORY_LIMIT: "1G"
|
|
|
|
|
PHP_MAX_EXECUTION_TIME: "600"
|
|
|
|
|
PHP_UPLOAD_MAX_FILESIZE: "64M"
|
|
|
|
|
PHP_POST_MAX_SIZE: "64M"
|
|
|
|
|
env_file:
|
|
|
|
|
- ./api/.env
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
redis:
|
|
|
|
|
condition: service_healthy
|
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
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "php /usr/share/nginx/html/artisan app:scheduler-status --mode=check --max-minutes=3 || exit 1"]
|
|
|
|
|
interval: 60s
|
|
|
|
|
timeout: 30s
|
|
|
|
|
retries: 3
|
2025-06-05 17:42:01 +02:00
|
|
|
start_period: 70s
|
2024-08-05 12:06:20 +02:00
|
|
|
|
|
|
|
|
ui:
|
2025-05-27 18:17:18 +02:00
|
|
|
image: jhumanj/opnform-client:latest
|
2025-01-29 16:00:01 +01:00
|
|
|
container_name: opnform-client
|
2025-06-05 17:42:01 +02:00
|
|
|
ports:
|
2025-06-05 18:00:12 +02:00
|
|
|
- "0.0.0.0:7655:3000" # UI on port 7655 - accessible from any IP
|
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
|
|
|
env_file:
|
2025-01-29 16:00:01 +01:00
|
|
|
- ./client/.env
|
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
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "wget --spider -q http://localhost:3000/login || exit 1"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 3
|
|
|
|
|
start_period: 45s
|
2025-06-05 18:00:12 +02:00
|
|
|
restart: unless-stopped
|
2024-08-05 12:06:20 +02:00
|
|
|
|
|
|
|
|
redis:
|
|
|
|
|
image: redis:7
|
2025-01-29 16:00:01 +01:00
|
|
|
container_name: opnform-redis
|
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
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 5s
|
2024-08-05 12:06:20 +02:00
|
|
|
|
|
|
|
|
db:
|
|
|
|
|
image: postgres:16
|
2025-01-29 16:00:01 +01:00
|
|
|
container_name: opnform-db
|
2024-08-05 12:06:20 +02:00
|
|
|
environment:
|
|
|
|
|
POSTGRES_DB: ${DB_DATABASE:-forge}
|
|
|
|
|
POSTGRES_USER: ${DB_USERNAME:-forge}
|
|
|
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-forge}
|
2025-01-28 17:52:48 +01:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME:-forge}"]
|
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
|
|
|
interval: 30s
|
2025-01-28 17:52:48 +01:00
|
|
|
timeout: 5s
|
2024-08-05 12:06:20 +02:00
|
|
|
volumes:
|
|
|
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
|
|
|
|
|
|
volumes:
|
2024-08-28 17:20:17 +02:00
|
|
|
postgres-data:
|
2025-06-05 17:42:01 +02:00
|
|
|
opnform_storage:
|