SorovotPelo commited on
Commit
5957664
verified
1 Parent(s): a36c9dd

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +40 -0
Dockerfile ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Usa una imagen base de PHP con soporte para FPM
2
+ FROM php:8.2-fpm
3
+
4
+ # Instala las dependencias necesarias
5
+ RUN apt-get update && apt-get install -y \
6
+ nginx \
7
+ mariadb-server \
8
+ imagemagick \
9
+ graphicsmagick \
10
+ gifsicle \
11
+ git \
12
+ unzip \
13
+ certbot \
14
+ python3-certbot-nginx \
15
+ && docker-php-ext-install bcmath gd pdo pdo_mysql mbstring
16
+
17
+ # Instala Composer
18
+ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
19
+
20
+ # Clona el repositorio de Vichan
21
+ RUN git clone https://github.com/vichan-devel/vichan.git /var/www/chan.example.org
22
+
23
+ # Instala las dependencias de PHP con Composer
24
+ WORKDIR /var/www/chan.example.org
25
+ RUN composer install
26
+
27
+ # Cambia los permisos para el usuario www-data
28
+ RUN chown -R www-data:www-data /var/www/chan.example.org
29
+
30
+ # Copia el archivo de configuraci贸n de NGINX
31
+ COPY nginx.conf /etc/nginx/sites-available/default
32
+
33
+ # Exponer el puerto 80
34
+ EXPOSE 80
35
+
36
+ # Comando para iniciar todos los servicios necesarios
37
+ CMD service mysql start && \
38
+ service php8.2-fpm start && \
39
+ service nginx start && \
40
+ tail -f /dev/null