Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
FROM --platform=amd64 nginx:bookworm
FROM nginx:bookworm

RUN apt update && apt dist-upgrade -y
RUN apt-get install -y --no-install-recommends \
git=1:2.39.5-* \
composer=2.5.5-* \
php=2:8.2* \
php-cli=2:8.2* \
git \
composer \
php \
php-cli \
php-opcache \
php-mysql=2:8.2* \
php-pgsql=2:8.2* \
php-zip=2:8.2* \
php-gd=2:8.2* \
php-mbstring=2:8.2* \
php-curl=2:8.2* \
php-xml=2:8.2* \
php-mysql \
php-pgsql \
php-zip \
php-gd \
php-mbstring \
php-curl \
php-xml \
mariadb-server \
cron \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -46,4 +46,4 @@ RUN chmod u+x /opt/entrypoint.sh

EXPOSE 80

ENTRYPOINT "/opt/entrypoint.sh"
ENTRYPOINT ["/opt/entrypoint.sh"]
52 changes: 29 additions & 23 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
version: "3.7"
services:
web:
image: deming
mysql:
condition: service_healthy
build:
context: .
dockerfile: Dockerfile_web
context: .
dockerfile: Dockerfile_web
environment:
### PLEASE DISABLE AFTER THE FIRST RUN FOR OPTIMIZATION PRODUCTION
- DB_SLEEP=10
### PLEASE DISABLE FOR PRODUCTION
- USE_DEMO_DATA=1
### PLEASE DISABLE FOR PRODUCTION
#- RESET_DB=FR #EN OR FR
### PLEASE AFTER ONE RUN DISABLE FOR OPTIMIZATION
- UPLOAD_DB_ISO27001=FR #EN OR FR
### PLEASE AFTER ONE RUN DISABLE FOR OPTIMIZATION
- INITIAL_DB=FR #EN OR FR
- TZ=Europe/Paris
DB_HOST: mysql
DB_DATABASE: 'deming'
DB_USER: 'deming_user'
DB_PASSWORD: 'demPasssword-123'
DB_ROOT_PASSWORD: 'root'
### PLEASE DISABLE AFTER THE FIRST RUN FOR OPTIMIZATION PRODUCTION
DB_SLEEP=10
### PLEASE DISABLE FOR PRODUCTION
USE_DEMO_DATA=1
### PLEASE DISABLE FOR PRODUCTION
RESET_DB=FR #EN OR FR
### PLEASE AFTER ONE RUN DISABLE FOR OPTIMIZATION
UPLOAD_DB_ISO27001=FR #EN OR FR
### PLEASE AFTER ONE RUN DISABLE FOR OPTIMIZATION
INITIAL_DB=FR #EN OR FR
TZ=Europe/Paris
volumes:
- ./custom/.env:/var/www/deming/.env
- ./custom/custom_postfix_main.cf:/etc/postfix/main.cf
- ./custom/custom_postfix_mailname:/etc/mailname
- ./custom/deming.php:/var/www/deming/config/deming.php
- ./custom/Kernel.php:/var/www/deming/app/Console/Kernel.php
- ./custom/app.php:/var/www/deming/config/app.php
- ./custom/.env:/var/www/deming/.env
- ./custom/custom_postfix_main.cf:/etc/postfix/main.cf
- ./custom/custom_postfix_mailname:/etc/mailname
- ./custom/deming.php:/var/www/deming/config/deming.php
- ./custom/Kernel.php:/var/www/deming/app/Console/Kernel.php
- ./custom/app.php:/var/www/deming/config/app.php
ports:
- 80:80
depends_on:
mysql:
condition: service_healthy
- 8000:80

mysql:
image: mysql:8
environment:
Expand Down
6 changes: 3 additions & 3 deletions docker/initialdb.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Définit un délai de sommeil par défaut de 10 secondes
DEFAULT_SLEEP=1
DEFAULT_SLEEP=1

# Vérifie si la variable d'environnement RESET_DB_SLEEP est définie
if [ -n "${DB_SLEEP}" ]; then
Expand All @@ -22,15 +22,15 @@ if [ "${INITIAL_DB}" = "EN" ]; then
# Se déplace vers le répertoire /var/www/deming/
cd /var/www/deming/
# Exécute la commande
php artisan migrate --seed
php artisan migrate --seed --force
# Exit avec le code 0 pour indiquer que le script s'est terminé avec succès
exit 0
fi
if [ "${INITIAL_DB}" = "FR" ]; then
# Se déplace vers le répertoire /var/www/deming/
cd /var/www/deming/
# Exécute la commande
LANG=fr php artisan migrate --seed
LANG=fr php artisan migrate --seed --force
# Exit avec le code 0 pour indiquer que le script s'est terminé avec succès
exit 0
fi
4 changes: 2 additions & 2 deletions docker/resetdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ if [ "${RESET_DB}" = "EN" ]; then
# Se déplace vers le répertoire /var/www/deming/
cd /var/www/deming/
# Exécute la commande
php artisan migrate:fresh --seed
php artisan migrate:fresh --seed --force
# Exit avec le code 0 pour indiquer que le script s'est terminé avec succès
exit 0
fi
if [ "${RESET_DB}" = "FR" ]; then
# Se déplace vers le répertoire /var/www/deming/
cd /var/www/deming/
# Exécute la commande
LANG=fr php artisan migrate:fresh --seed
LANG=fr php artisan migrate:fresh --seed --force
# Exit avec le code 0 pour indiquer que le script s'est terminé avec succès
exit 0
fi