Actualiza la configuración del entorno y los archivos de Docker para el proyecto
This commit is contained in:
parent
e8da447b68
commit
80bd249176
27
.env.example
27
.env.example
@ -1,12 +1,16 @@
|
|||||||
APP_NAME="Holos"
|
APP_NAME="Arcos"
|
||||||
APP_ENV=local
|
APP_ENV=local
|
||||||
APP_KEY=
|
APP_KEY=base64:2qBv3agj3nPac2/LlDEAiQBE3vV7ycffh4lhc0ksfGM=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_TIMEZONE=America/Mexico_City
|
APP_TIMEZONE=America/Mexico_City
|
||||||
APP_URL=http://backend.holos.test
|
APP_URL=http://localhost:8080
|
||||||
APP_FRONTEND_URL=http://frontend.holos.test
|
APP_FRONTEND_URL=http://localhost:3000
|
||||||
APP_PAGINATION=25
|
APP_PAGINATION=25
|
||||||
|
|
||||||
|
# Variables usadas en docker-compose.yml
|
||||||
|
NGINX_PORT=8080
|
||||||
|
PMA_PORT=8081
|
||||||
|
|
||||||
APP_LOCALE=es
|
APP_LOCALE=es
|
||||||
APP_FALLBACK_LOCALE=es
|
APP_FALLBACK_LOCALE=es
|
||||||
APP_FAKER_LOCALE=es_MX
|
APP_FAKER_LOCALE=es_MX
|
||||||
@ -31,13 +35,9 @@ LOG_LEVEL=debug
|
|||||||
DB_CONNECTION=mysql
|
DB_CONNECTION=mysql
|
||||||
DB_HOST=mysql
|
DB_HOST=mysql
|
||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
DB_DATABASE=holos-backend
|
DB_DATABASE=arcos
|
||||||
DB_USERNAME=notsoweb
|
DB_USERNAME=
|
||||||
DB_PASSWORD=
|
DB_PASSWORD=
|
||||||
PMA_PORT=8081 # Puerto para phpMyAdmin
|
|
||||||
|
|
||||||
REDIS_PORT=6379 # Puerto para Redis
|
|
||||||
NGINX_PORT=8080 # Puerto para Nginx
|
|
||||||
|
|
||||||
SESSION_DRIVER=database
|
SESSION_DRIVER=database
|
||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
@ -75,6 +75,13 @@ AWS_DEFAULT_REGION=us-east-1
|
|||||||
AWS_BUCKET=
|
AWS_BUCKET=
|
||||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
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_ID=
|
||||||
REVERB_APP_KEY=
|
REVERB_APP_KEY=
|
||||||
REVERB_APP_SECRET=
|
REVERB_APP_SECRET=
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name _;
|
server_name _;
|
||||||
root /var/www/golscontrols/public;
|
root /var/www/arcos-backend/public;
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
@ -17,7 +17,7 @@ server {
|
|||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_pass golscontrols:9000;
|
fastcgi_pass arcos-backend:9000;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
|
|
||||||
# Timeouts importantes para evitar errores 500
|
# Timeouts importantes para evitar errores 500
|
||||||
@ -45,17 +45,17 @@ server {
|
|||||||
|
|
||||||
# Handle storage files (Laravel storage link)
|
# Handle storage files (Laravel storage link)
|
||||||
location /storage {
|
location /storage {
|
||||||
alias /var/www/golscontrols/storage/app;
|
alias /var/www/arcos-backend/storage/app;
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /profile {
|
location /profile {
|
||||||
alias /var/www/golscontrols/storage/app/profile;
|
alias /var/www/arcos-backend/storage/app/profile;
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /images {
|
location /images {
|
||||||
alias /var/www/golscontrols/storage/app/images;
|
alias /var/www/arcos-backend/storage/app/images;
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
services:
|
services:
|
||||||
repuve-backend:
|
arcos-backend:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: dockerfile.dev
|
dockerfile: dockerfile
|
||||||
working_dir: /var/www/repuve-v1
|
working_dir: /var/www/arcos-backend
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=mysql
|
- DB_HOST=mysql
|
||||||
- DB_USERNAME=${DB_USERNAME}
|
- DB_USERNAME=${DB_USERNAME}
|
||||||
@ -11,27 +11,28 @@ services:
|
|||||||
- DB_DATABASE=${DB_DATABASE}
|
- DB_DATABASE=${DB_DATABASE}
|
||||||
- DB_PORT=${DB_PORT}
|
- DB_PORT=${DB_PORT}
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/var/www/repuve-v1
|
- ./:/var/www/arcos-backend
|
||||||
- /var/www/repuve-v1/vendor
|
- ./vendor:/var/www/arcos/vendor
|
||||||
networks:
|
networks:
|
||||||
- repuve-network
|
- arcos-network
|
||||||
|
mem_limit: 512M
|
||||||
depends_on:
|
depends_on:
|
||||||
mysql:
|
mysql:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
redis:
|
|
||||||
condition: service_healthy
|
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
ports:
|
ports:
|
||||||
- "${NGINX_PORT}:80"
|
- "${NGINX_PORT}:80"
|
||||||
volumes:
|
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
|
- ./Docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||||
networks:
|
networks:
|
||||||
- repuve-network
|
- arcos-network
|
||||||
|
mem_limit: 400m
|
||||||
depends_on:
|
depends_on:
|
||||||
- repuve-backend
|
- arcos-backend
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:8.0
|
image: mysql:8.0
|
||||||
@ -45,7 +46,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- mysql_data:/var/lib/mysql
|
- mysql_data:/var/lib/mysql
|
||||||
networks:
|
networks:
|
||||||
- repuve-network
|
- arcos-network
|
||||||
|
mem_limit: 400m
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||||
timeout: 15s
|
timeout: 15s
|
||||||
@ -61,27 +63,15 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
- mysql
|
||||||
networks:
|
networks:
|
||||||
- repuve-network
|
- arcos-network
|
||||||
|
mem_limit: 400m
|
||||||
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
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
nginx_data:
|
||||||
|
driver: local
|
||||||
mysql_data:
|
mysql_data:
|
||||||
driver: local
|
driver: local
|
||||||
redis_data:
|
|
||||||
driver: local
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
repuve-network:
|
arcos-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
21
dockerfile
21
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 apk add --no-cache \
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y\
|
|
||||||
git \
|
git \
|
||||||
curl \
|
curl \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libonig-dev \
|
oniguruma-dev \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
zip \
|
zip \
|
||||||
unzip \
|
unzip \
|
||||||
libzip-dev \
|
libzip-dev \
|
||||||
nano \
|
nano \
|
||||||
openssl
|
openssl \
|
||||||
|
bash \
|
||||||
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip
|
mysql-client \
|
||||||
|
&& docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip
|
||||||
|
|
||||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
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 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 chown -R www-data:www-data /var/www/arcos-backend/storage /var/www/arcos-backend/bootstrap/cache
|
||||||
RUN chmod -R 775 /var/www/repuve-v1/storage /var/www/repuve-v1/bootstrap/cache
|
RUN chmod -R 775 /var/www/arcos-backend/storage /var/www/arcos-backend/bootstrap/cache
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user