-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (26 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM php:8.3.11-apache
RUN apt-get update -y && apt-get install -y openssl zip unzip git
RUN docker-php-ext-install pdo_mysql
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY . /var/www/html
COPY ./public/.htaccess /var/www/html/.htaccess
WORKDIR /var/www/html
# Renombrar .env.example a .env y agregar campos necesarios
RUN cp .env.example .env
RUN sed -i 's/DB_DATABASE=laravel/DB_DATABASE=pixel-plaza-bd/' .env
RUN sed -i 's/DB_USERNAME=root/DB_USERNAME=pixelplaza/' .env
RUN sed -i 's/DB_PASSWORD=/DB_PASSWORD=pixelplazapass/' .env
RUN sed -i 's/DB_HOST=127.0.0.1/DB_HOST=34.46.49.118/' .env
RUN echo "GEMINI_API_KEY=${GEMINI_API_KEY}" >> .env
RUN echo "HUGGINGFACE_API_KEY=${HUGGINGFACE_API_KEY}" >> .env
RUN composer install \
--ignore-platform-reqs \
--no-interaction \
--no-plugins \
--no-scripts \
--prefer-dist
RUN php artisan key:generate
RUN php artisan migrate
RUN chmod -R 777 storage
RUN a2enmod rewrite
RUN service apache2 restart