mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-10 06:35:54 +01:00
Creazione docker del progetto openstamanager
This commit is contained in:
parent
499647875d
commit
72bd48eb25
75
docker/Dockerfile
Normal file
75
docker/Dockerfile
Normal file
@ -0,0 +1,75 @@
|
||||
# Usa l'immagine ufficiale di PHP con Apache
|
||||
FROM php:8.3-apache
|
||||
|
||||
# Abilita i moduli richiesti
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libzip-dev \
|
||||
libicu-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libxml2-dev \
|
||||
libpng-dev \
|
||||
libonig-dev \
|
||||
unzip \
|
||||
libxml2-dev \
|
||||
libxslt-dev \
|
||||
git && \
|
||||
docker-php-ext-install zip mbstring pdo_mysql intl soap curl && \
|
||||
a2enmod rewrite
|
||||
|
||||
RUN docker-php-ext-install xsl ftp
|
||||
|
||||
RUN docker-php-ext-enable xsl ftp
|
||||
|
||||
RUN apt-get install -y libpng-dev libjpeg-dev \
|
||||
&& docker-php-ext-configure gd --with-jpeg \
|
||||
&& docker-php-ext-install gd
|
||||
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
|
||||
&& apt-get install -y nodejs
|
||||
|
||||
|
||||
# Configura i parametri di PHP
|
||||
COPY php.ini /usr/local/etc/php/
|
||||
|
||||
# Installa Composer
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Configura l'applicazione
|
||||
WORKDIR /var/www/html
|
||||
# Esponi la porta per Apache
|
||||
EXPOSE 80
|
||||
|
||||
# Clona il repository
|
||||
RUN git clone https://github.com/devcode-it/openstamanager.git /var/www/html
|
||||
|
||||
RUN mkdir -p /var/www/html/files/temp /var/www/html/logs
|
||||
RUN chmod -R 777 /var/www/html/files /var/www/html/logs
|
||||
RUN touch /var/www/html/manifest.json \
|
||||
/var/www/html/mariadb_10_x.json \
|
||||
/var/www/html/mysql_8_3.json \
|
||||
/var/www/html/mysql.json \
|
||||
/var/www/html/checksum.json \
|
||||
/var/www/html/settings.json
|
||||
|
||||
RUN chown -R $USER:www-data *
|
||||
|
||||
# Installa le dipendenze PHP con Composer
|
||||
#RUN composer install
|
||||
|
||||
# Installa Gulp globalmente con Yarn
|
||||
#RUN yarn global add gulp
|
||||
#RUN npm install -g gulp husky
|
||||
|
||||
|
||||
# Installa le dipendenze Node.js
|
||||
#RUN npm install
|
||||
|
||||
# Esegui Gulp per la build
|
||||
#RUN gulp
|
||||
RUN curl -sS https://getcomposer.org/installer | php
|
||||
RUN git config --global --add safe.directory /var/www/html
|
||||
RUN corepack enable
|
||||
RUN corepack prepare yarn@stable --activate
|
||||
|
||||
RUN yarn run develop-OSM
|
||||
|
26
docker/docker-compose.yml
Normal file
26
docker/docker-compose.yml
Normal file
@ -0,0 +1,26 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
container_name: openstamanager
|
||||
ports:
|
||||
- "8090:80"
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
- APP_ENV=local
|
||||
- DB_HOST=db
|
||||
- DB_PORT=3306
|
||||
- DB_DATABASE=openstamanager
|
||||
- DB_USERNAME=root
|
||||
- DB_PASSWORD=secret
|
||||
|
||||
db:
|
||||
image: mysql:8.4
|
||||
container_name: mysql
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: secret
|
||||
MYSQL_DATABASE: openstamanager
|
||||
ports:
|
||||
- "3306:3306"
|
6
docker/php.ini
Normal file
6
docker/php.ini
Normal file
@ -0,0 +1,6 @@
|
||||
upload_max_filesize = 32M
|
||||
post_max_size = 32M
|
||||
max_input_vars = 5000
|
||||
display_errors = Off
|
||||
log_errors = On
|
||||
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING
|
Loading…
Reference in New Issue
Block a user