From 80bd249176778c6dd3b660ba1a2df7dc04e0cfd6 Mon Sep 17 00:00:00 2001 From: Juan Felipe Zapata Moreno Date: Thu, 18 Dec 2025 16:23:10 -0600 Subject: [PATCH] =?UTF-8?q?Actualiza=20la=20configuraci=C3=B3n=20del=20ent?= =?UTF-8?q?orno=20y=20los=20archivos=20de=20Docker=20para=20el=20proyecto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 27 ++++++++++++++--------- Docker/nginx/nginx.conf | 10 ++++----- docker-compose.yml | 48 ++++++++++++++++------------------------- dockerfile | 23 ++++++++++---------- 4 files changed, 52 insertions(+), 56 deletions(-) diff --git a/.env.example b/.env.example index 7bd6183..98176ad 100644 --- a/.env.example +++ b/.env.example @@ -1,12 +1,16 @@ -APP_NAME="Holos" +APP_NAME="Arcos" APP_ENV=local -APP_KEY= +APP_KEY=base64:2qBv3agj3nPac2/LlDEAiQBE3vV7ycffh4lhc0ksfGM= APP_DEBUG=true APP_TIMEZONE=America/Mexico_City -APP_URL=http://backend.holos.test -APP_FRONTEND_URL=http://frontend.holos.test +APP_URL=http://localhost:8080 +APP_FRONTEND_URL=http://localhost:3000 APP_PAGINATION=25 +# Variables usadas en docker-compose.yml +NGINX_PORT=8080 +PMA_PORT=8081 + APP_LOCALE=es APP_FALLBACK_LOCALE=es APP_FAKER_LOCALE=es_MX @@ -31,13 +35,9 @@ LOG_LEVEL=debug DB_CONNECTION=mysql DB_HOST=mysql DB_PORT=3306 -DB_DATABASE=holos-backend -DB_USERNAME=notsoweb +DB_DATABASE=arcos +DB_USERNAME= DB_PASSWORD= -PMA_PORT=8081 # Puerto para phpMyAdmin - -REDIS_PORT=6379 # Puerto para Redis -NGINX_PORT=8080 # Puerto para Nginx SESSION_DRIVER=database SESSION_LIFETIME=120 @@ -75,6 +75,13 @@ AWS_DEFAULT_REGION=us-east-1 AWS_BUCKET= AWS_USE_PATH_STYLE_ENDPOINT=false +REPUVE_FED_BASE_URL= +REPUVE_FED_USERNAME= +REPUVE_FED_PASSWORD= + +# REPUVE ESTATAL +REPUVE_EST_URL= + REVERB_APP_ID= REVERB_APP_KEY= REVERB_APP_SECRET= diff --git a/Docker/nginx/nginx.conf b/Docker/nginx/nginx.conf index 4ce5974..ef22270 100644 --- a/Docker/nginx/nginx.conf +++ b/Docker/nginx/nginx.conf @@ -1,7 +1,7 @@ server { listen 80; server_name _; - root /var/www/golscontrols/public; + root /var/www/arcos-backend/public; index index.php index.html; # Logging @@ -17,7 +17,7 @@ server { location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass golscontrols:9000; + fastcgi_pass arcos-backend:9000; fastcgi_index index.php; # Timeouts importantes para evitar errores 500 @@ -45,17 +45,17 @@ server { # Handle storage files (Laravel storage link) location /storage { - alias /var/www/golscontrols/storage/app; + alias /var/www/arcos-backend/storage/app; try_files $uri =404; } location /profile { - alias /var/www/golscontrols/storage/app/profile; + alias /var/www/arcos-backend/storage/app/profile; try_files $uri =404; } location /images { - alias /var/www/golscontrols/storage/app/images; + alias /var/www/arcos-backend/storage/app/images; try_files $uri =404; } diff --git a/docker-compose.yml b/docker-compose.yml index 3b1c760..8531c36 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,9 @@ services: - repuve-backend: + arcos-backend: build: context: . - dockerfile: dockerfile.dev - working_dir: /var/www/repuve-v1 + dockerfile: dockerfile + working_dir: /var/www/arcos-backend environment: - DB_HOST=mysql - DB_USERNAME=${DB_USERNAME} @@ -11,27 +11,28 @@ services: - DB_DATABASE=${DB_DATABASE} - DB_PORT=${DB_PORT} volumes: - - ./:/var/www/repuve-v1 - - /var/www/repuve-v1/vendor + - ./:/var/www/arcos-backend + - ./vendor:/var/www/arcos/vendor networks: - - repuve-network + - arcos-network + mem_limit: 512M depends_on: mysql: condition: service_healthy - redis: - condition: service_healthy nginx: image: nginx:alpine ports: - "${NGINX_PORT}:80" volumes: - - ./public:/var/www/repuve-v1/public + - ./public:/var/www/arcos-backend/public + - ./storage:/var/www/arcos-backend/storage - ./Docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf networks: - - repuve-network + - arcos-network + mem_limit: 400m depends_on: - - repuve-backend + - arcos-backend mysql: image: mysql:8.0 @@ -45,7 +46,8 @@ services: volumes: - mysql_data:/var/lib/mysql networks: - - repuve-network + - arcos-network + mem_limit: 400m healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] timeout: 15s @@ -61,27 +63,15 @@ services: depends_on: - mysql networks: - - repuve-network - - redis: - image: redis:alpine - ports: - - "${REDIS_PORT}:6379" - volumes: - - redis_data:/data - networks: - - repuve-network - healthcheck: - test: ["CMD", "redis-cli", "ping"] - timeout: 5s - retries: 5 + - arcos-network + mem_limit: 400m volumes: - mysql_data: + nginx_data: driver: local - redis_data: + mysql_data: driver: local networks: - repuve-network: + arcos-network: driver: bridge diff --git a/dockerfile b/dockerfile index 7cee8a0..7a9d99b 100644 --- a/dockerfile +++ b/dockerfile @@ -1,22 +1,21 @@ -FROM php:8.3-fpm +FROM php:8.3-fpm-alpine -RUN mkdir -p /var/www/repuve-v1 +WORKDIR /var/www/arcos-backend -WORKDIR /var/www/repuve-v1 - -RUN apt-get update && apt-get install -y\ +RUN apk add --no-cache \ git \ curl \ libpng-dev \ - libonig-dev \ + oniguruma-dev \ libxml2-dev \ zip \ unzip \ - libzip-dev\ + libzip-dev \ nano \ - openssl - -RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip + openssl \ + bash \ + mysql-client \ + && docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip COPY --from=composer:latest /usr/bin/composer /usr/bin/composer @@ -31,8 +30,8 @@ RUN chmod +x /usr/local/bin/entrypoint-dev.sh RUN mkdir -p storage/app/keys storage/logs bootstrap/cache -RUN chown -R www-data:www-data /var/www/repuve-v1/storage /var/www/repuve-v1/bootstrap/cache -RUN chmod -R 775 /var/www/repuve-v1/storage /var/www/repuve-v1/bootstrap/cache +RUN chown -R www-data:www-data /var/www/arcos-backend/storage /var/www/arcos-backend/bootstrap/cache +RUN chmod -R 775 /var/www/arcos-backend/storage /var/www/arcos-backend/bootstrap/cache EXPOSE 9000