first commit
This commit is contained in:
commit
1c70d32d3a
4
.env-gmolab
Normal file
4
.env-gmolab
Normal file
@ -0,0 +1,4 @@
|
||||
HOST_NAME=wp-dev.gmolab.net
|
||||
HOST_IP=172.31.10.15
|
||||
PHPADMIN_IMAGE=arm64v8/phpmyadmin:5.2.3
|
||||
ENVIRONMENT=gmolab
|
||||
4
.env-vdglab
Normal file
4
.env-vdglab
Normal file
@ -0,0 +1,4 @@
|
||||
HOST_NAME=wp-dev.gmolab.net
|
||||
HOST_IP=172.31.10.15
|
||||
PHPADMIN_IMAGE=phpmyadmin/phpmyadmin:latest
|
||||
ENVIRONMENT=vdglab
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.env
|
||||
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"editor.fontSize": 13,
|
||||
"terminal.integrated.fontSize": 13,
|
||||
"window.zoomLevel": 1.4,
|
||||
}
|
||||
128
AI.md
Normal file
128
AI.md
Normal file
@ -0,0 +1,128 @@
|
||||
theme: blocksy
|
||||
template: codespot
|
||||
|
||||
|
||||
Parfait ! Voici un **guide pas-à-pas détaillé** pour configurer ton site d’association WordPress avec **entête, galerie, actualités, formulaire de contact et compteurs animés**, **sans blog**. On va partir sur **un thème polyvalent gratuit** comme **Astra** ou **Blocksy**, car ils offrent le plus de flexibilité pour ton cas.
|
||||
|
||||
---
|
||||
|
||||
## 1️⃣ Installation de WordPress et du thème
|
||||
|
||||
1. Connecte-toi à ton **WordPress**.
|
||||
2. Va dans **Apparence → Thèmes → Ajouter**.
|
||||
3. Cherche **Astra** ou **Blocksy** et clique sur **Installer → Activer**.
|
||||
4. (Optionnel) Installe un **starter site** pour gagner du temps :
|
||||
|
||||
* Astra → **Astra Starter Templates** (plugin gratuit)
|
||||
* Blocksy → **Blocksy Companion**
|
||||
Choisis un modèle type **Portfolio / Association / Gallery**.
|
||||
|
||||
---
|
||||
|
||||
## 2️⃣ Configurer l’entête et le menu
|
||||
|
||||
1. Va dans **Apparence → Personnaliser → En-tête / Header**.
|
||||
2. **Logo** : téléverse ton logo (image de ton association ou de l’automotrice).
|
||||
3. **Menu** :
|
||||
|
||||
* Va dans **Apparence → Menus → Créer un menu**.
|
||||
* Ajoute les pages : `À propos`, `Galerie`, `Actualités`, `Contact`, `Facebook`.
|
||||
* Sélectionne “Menu principal” comme emplacement.
|
||||
4. Vérifie le **responsive** : le menu doit s’adapter aux mobiles (burger menu).
|
||||
|
||||
---
|
||||
|
||||
## 3️⃣ Créer les pages principales
|
||||
|
||||
1. **À propos** :
|
||||
|
||||
* Crée une page simple avec texte et image(s) sur l’association et la restauration.
|
||||
* Utilise les blocs WordPress (texte, image, colonnes).
|
||||
|
||||
2. **Galerie** :
|
||||
|
||||
* Crée une page “Galerie”.
|
||||
* Méthode simple : **Bloc Galerie** → téléverse tes photos de l’automotrice.
|
||||
* Méthode avancée (plus d’options) : installer **Envira Gallery** ou **Modula Gallery** (plugins gratuits).
|
||||
|
||||
* Crée une galerie, puis insère-la via le bloc ou le shortcode.
|
||||
|
||||
3. **Actualités** :
|
||||
|
||||
* Comme tu ne veux pas de blog, crée un **Custom Post Type “Actualités”** :
|
||||
|
||||
1. Installe **Custom Post Type UI**.
|
||||
2. Crée un type “Actualités”.
|
||||
3. Chaque événement ou nouvelle restauration devient un post.
|
||||
4. Sur la page “Actualités”, insère le bloc **Liste de posts** du type “Actualités”.
|
||||
|
||||
4. **Contact** :
|
||||
|
||||
* Installe **Contact Form 7**.
|
||||
* Crée un formulaire simple : nom, email, message.
|
||||
* Copie le **shortcode** et colle-le sur la page “Contact”.
|
||||
* Optionnel : ajoute un bloc **Google Maps** si tu veux la localisation de ton association.
|
||||
|
||||
---
|
||||
|
||||
## 4️⃣ Ajouter le pied de page
|
||||
|
||||
1. Va dans **Apparence → Personnaliser → Pied de page / Footer**.
|
||||
2. Ajouter :
|
||||
|
||||
* Texte de copyright
|
||||
* Menu secondaire ou liens utiles
|
||||
* Icônes réseaux sociaux (Facebook)
|
||||
3. Vérifie que le style correspond à l’en-tête (couleurs et polices).
|
||||
|
||||
---
|
||||
|
||||
## 5️⃣ Ajouter un bandeau avec 4 compteurs animés
|
||||
|
||||
**Option avec Elementor (recommandé)** :
|
||||
|
||||
1. Installe **Elementor** + **UiCore Elements**.
|
||||
2. Crée une **page ou section spéciale** (souvent la page d’accueil).
|
||||
3. Ajoute un **Section à 4 colonnes**.
|
||||
4. Dans chaque colonne, ajoute un **Counter Widget** :
|
||||
|
||||
* Exemple :
|
||||
|
||||
* “Automotrices restaurées : 1”
|
||||
* “Bénévoles actifs : 12”
|
||||
* “Années de patrimoine : 65”
|
||||
* “Heures de restauration : 3000+”
|
||||
5. Configure l’**animation** :
|
||||
|
||||
* Définis le **décompte de 0 → valeur cible**
|
||||
* Choisis la vitesse
|
||||
6. Publie la page.
|
||||
|
||||
---
|
||||
|
||||
## 6️⃣ Mise en page de la page d’accueil
|
||||
|
||||
* Utilise l’éditeur Gutenberg ou Elementor pour **composer ta home** :
|
||||
|
||||
* Bandeau d’introduction (image + slogan)
|
||||
* Galerie photos
|
||||
* Section actualités
|
||||
* Bandeau compteurs
|
||||
* Formulaire de contact
|
||||
* Ajoute des **ancres ou liens dans le menu** pour naviguer rapidement vers chaque section.
|
||||
|
||||
---
|
||||
|
||||
## 7️⃣ Bonus : masquer le blog
|
||||
|
||||
* Si le thème impose un blog :
|
||||
|
||||
1. Crée une **page d’accueil statique** : `Accueil → Modifier → Page statique`.
|
||||
2. Dans **Réglages → Lecture**, sélectionne cette page comme **Page d’accueil** et laisse “Articles” vide ou redirige vers la page “Actualités”.
|
||||
3. Supprime les widgets/blog du menu si nécessaire.
|
||||
|
||||
---
|
||||
|
||||
Si tu veux, je peux te faire un **schéma visuel de la structure du site** avec les sections et les plugins associés. Ça aide énormément à construire la page d’accueil et le menu rapidement.
|
||||
|
||||
Veux‑tu que je fasse ce schéma ?
|
||||
99
README.md
Normal file
99
README.md
Normal file
@ -0,0 +1,99 @@
|
||||
# Portainer
|
||||
|
||||
## Description
|
||||
This docker compose run portainer on docker
|
||||
|
||||
## Requierments
|
||||
### Folder
|
||||
```bash
|
||||
sudo mkdir -p /home/docker/portainer/data
|
||||
```
|
||||
### Certificats
|
||||
Copy crt and key files on `/home/docker/certs/`
|
||||
|
||||
## Run
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
## Config
|
||||
By default the lifetime of the password is 8 hours. For modify goto **Settings** -> **Authentication**
|
||||
The maximum lifetime is 1 year
|
||||
|
||||
## Reset admin password
|
||||
```bash
|
||||
docker container stop portainer
|
||||
docker run --rm -v /home/docker/portainer/data:/data portainer/helper-reset-password
|
||||
...
|
||||
2024/11/15 21:22:13 Password successfully updated for user: admin
|
||||
2024/11/15 21:22:13 Use the following password to login: 9fB1`%r50ZVH:(XutQqm#M<_LE387,w2
|
||||
```
|
||||
|
||||
## Apache
|
||||
### http-portainer.conf
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ServerName portainer.gmotech.net
|
||||
ServerAlias portainer
|
||||
CustomLog logs/portainer_access_log common
|
||||
ErrorLog logs/portainer_error_log
|
||||
# redirect to https
|
||||
RewriteEngine on
|
||||
RewriteCond %{SERVER_NAME} =portainer [OR]
|
||||
RewriteCond %{SERVER_NAME} =portainer.gmotech.net
|
||||
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
||||
</VirtualHost>
|
||||
```
|
||||
### https-portainer.conf
|
||||
```
|
||||
##
|
||||
## SSL Virtual Host Context
|
||||
##
|
||||
# General setup for the virtual host
|
||||
<VirtualHost *:443>
|
||||
ServerName portainer.gmotech.net
|
||||
ServerAlias portainer
|
||||
CustomLog logs/portainer_access_log common
|
||||
ErrorLog logs/portainer_error_log
|
||||
|
||||
# SSL
|
||||
SSLEngine on
|
||||
SSLHonorCipherOrder on
|
||||
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
|
||||
SSLHonorCipherOrder on
|
||||
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4
|
||||
# Enable HTTP/2, if available
|
||||
Protocols h2 http/1.1
|
||||
# HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
|
||||
Header always set Strict-Transport-Security "max-age=63072000"
|
||||
# certificats
|
||||
SSLCertificateFile "/etc/httpd/auth/cert/gmotech.net.crt"
|
||||
SSLCertificateKeyFile "/etc/httpd/auth/cert/gmotech.net.key"
|
||||
SSLCertificateChainFile "/etc/httpd/auth/cert/gmotechCA.crt"
|
||||
# proxy
|
||||
SSLProxyEngine On
|
||||
ProxyPreserveHost On
|
||||
ProxyRequests off
|
||||
ProxyPass "/" "http://127.0.0.1:9000/"
|
||||
ProxyPassReverse "/" "https://127.0.0.1:9000/"
|
||||
</VirtualHost>
|
||||
```
|
||||
## Access
|
||||
https://portainer.gmotech.net
|
||||
|
||||
## Change Session lifetime
|
||||
To TEST !! (one year)
|
||||
## Sources
|
||||
https://omar2cloud.github.io/rasp/psswd/
|
||||
https://docs.portainer.io/admin/settings/authentication
|
||||
|
||||
### Changelog
|
||||
### [1.0.1] - 2025-08-23
|
||||
#### Added
|
||||
- config behind a proxy or not
|
||||
---
|
||||
### [1.0.0] - 2024-11-11
|
||||
#### Added
|
||||
- initial version by [GMo](mailto:gilles.mouchet@gmail.com)
|
||||
|
||||
|
||||
|
||||
5
config/uploads.ini
Normal file
5
config/uploads.ini
Normal file
@ -0,0 +1,5 @@
|
||||
file_uploads = On
|
||||
memory_limit = 256M
|
||||
upload_max_filesize = 64M
|
||||
post_max_size = 64M
|
||||
max_execution_time = 300
|
||||
63
docker-compose.yaml
Normal file
63
docker-compose.yaml
Normal file
@ -0,0 +1,63 @@
|
||||
services:
|
||||
wordpress:
|
||||
image: wordpress:latest
|
||||
extra_hosts:
|
||||
#- "wp-dev.gmolab.net:172.31.10.15"
|
||||
- "${HOST_NAME}:${HOST_IP}"
|
||||
container_name: wordpress
|
||||
volumes:
|
||||
- /home/docker/wp/wp-site:/var/www/html
|
||||
- ./config/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: db
|
||||
WORDPRESS_DB_NAME: wordpress
|
||||
WORDPRESS_DB_USER: wpuser
|
||||
WORDPRESS_DB_PASSWORD: wppassword
|
||||
WORDPRESS_TABLE_PREFIX: wp_
|
||||
depends_on:
|
||||
- db
|
||||
# - phpmyadmin
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:80
|
||||
|
||||
db:
|
||||
image: mysql:8.0
|
||||
container_name: db
|
||||
volumes:
|
||||
- /home/docker/wp/wp-db:/var/lib/mysql
|
||||
# This is optional!!!
|
||||
- ./dump-db/${ENVIRONMENT}:/docker-entrypoint-initdb.d
|
||||
# # #
|
||||
environment:
|
||||
MYSQL_DATABASE: wordpress
|
||||
MYSQL_USER: wpuser
|
||||
MYSQL_PASSWORD: wppassword
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
|
||||
# - MYSQL_ROOT_PASSWORD=pa55w0rd
|
||||
# - MYSQL_USER=root
|
||||
# - MYSQL_PASSWORD=pa55w0rd4wp
|
||||
# - MYSQL_DATABASE=wordpress
|
||||
restart: always
|
||||
ports:
|
||||
- 3306:3306
|
||||
|
||||
phpmyadmin:
|
||||
depends_on:
|
||||
- db
|
||||
#image: phpmyadmin/phpmyadmin:latest
|
||||
#image: arm64v8/phpmyadmin:5.2.3
|
||||
image: ${PHPADMIN_IMAGE}
|
||||
container_name: phpmyadmin
|
||||
restart: always
|
||||
ports:
|
||||
- 8180:80
|
||||
environment:
|
||||
PMA_HOST: db
|
||||
PMA_USER: root
|
||||
PMA_PASSWORD: rootpassword
|
||||
#MYSQL_ROOT_PASSWORD: pa55w0rd
|
||||
|
||||
#volumes:
|
||||
# db_data:
|
||||
444
dump-db/gmolab/wp-dev.sql
Normal file
444
dump-db/gmolab/wp-dev.sql
Normal file
File diff suppressed because one or more lines are too long
30
https-phpmyadmin-dev.conf
Normal file
30
https-phpmyadmin-dev.conf
Normal file
@ -0,0 +1,30 @@
|
||||
##
|
||||
## SSL Virtual Host Context
|
||||
##
|
||||
# General setup for the virtual host
|
||||
<VirtualHost *:443>
|
||||
ServerName phpmyadmin-dev.gmolab.net
|
||||
ServerAlias phpmyadmin-dev
|
||||
CustomLog logs/phpmyadmin-dev_access_log common
|
||||
ErrorLog logs/phpmyadmin-dev_error_log
|
||||
|
||||
# SSL
|
||||
SSLEngine on
|
||||
SSLHonorCipherOrder on
|
||||
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
|
||||
SSLHonorCipherOrder on
|
||||
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4
|
||||
# Enable HTTP/2, if available
|
||||
Protocols h2 http/1.1
|
||||
# HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
|
||||
Header always set Strict-Transport-Security "max-age=63072000"
|
||||
# certificats
|
||||
SSLCertificateFile "/etc/httpd/auth/cert/gmolab.net.crt"
|
||||
SSLCertificateKeyFile "/etc/httpd/auth/cert/gmolab.net.key"
|
||||
SSLCertificateChainFile "/etc/httpd/auth/cert/gmolabCA.crt"
|
||||
# proxy
|
||||
RequestHeader set X-Forwarded-Proto "https"
|
||||
ProxyPreserveHost On
|
||||
ProxyPass "/" "http://127.0.0.1:8180/"
|
||||
ProxyPassReverse "/" "http://127.0.0.1:8180/"
|
||||
</VirtualHost>
|
||||
100
wp-config.php
Normal file
100
wp-config.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
/**
|
||||
* The base configuration for WordPress
|
||||
*
|
||||
* The wp-config.php creation script uses this file during the
|
||||
* installation. You don't have to use the web site, you can
|
||||
* copy this file to "wp-config.php" and fill in the values.
|
||||
*
|
||||
* This file contains the following configurations:
|
||||
*
|
||||
* * MySQL settings
|
||||
* * Secret keys
|
||||
* * Database table prefix
|
||||
* * ABSPATH
|
||||
*
|
||||
* @link https://codex.wordpress.org/Editing_wp-config.php
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
// ** MySQL settings - You can get this info from your web host ** //
|
||||
/** The name of the database for WordPress */
|
||||
//define( 'DB_NAME', '{{ mysql_wp_db }}' );
|
||||
define( 'DB_NAME', 'wordpress' );
|
||||
|
||||
/** MySQL database username */
|
||||
//define( 'DB_USER', '{{ mysql_wp_user }}' );
|
||||
define( 'DB_USER', 'wpuser' );
|
||||
|
||||
/** MySQL database password */
|
||||
//define( 'DB_USER', '{{ mysql_wp_user }}' );
|
||||
define( 'DB_USER', 'wppassword' );
|
||||
|
||||
/** MySQL hostname */
|
||||
define( 'DB_HOST', 'localhost' );
|
||||
|
||||
/** Database Charset to use in creating database tables. */
|
||||
define( 'DB_CHARSET', 'utf8' );
|
||||
|
||||
/** The Database Collate type. Don't change this if in doubt. */
|
||||
define( 'DB_COLLATE', '' );
|
||||
|
||||
/** Filesystem access **/
|
||||
define('FS_METHOD', 'direct');
|
||||
|
||||
/**#@+
|
||||
* Authentication Unique Keys and Salts.
|
||||
*
|
||||
* Change these to different unique phrases!
|
||||
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
|
||||
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*/
|
||||
define( 'AUTH_KEY', '{{ lookup('password', '/dev/null chars=ascii_letters length=64') }}' );
|
||||
define( 'SECURE_AUTH_KEY', '{{ lookup('password', '/dev/null chars=ascii_letters length=64') }}' );
|
||||
define( 'LOGGED_IN_KEY', '{{ lookup('password', '/dev/null chars=ascii_letters length=64') }}' );
|
||||
define( 'NONCE_KEY', '{{ lookup('password', '/dev/null chars=ascii_letters length=64') }}' );
|
||||
define( 'AUTH_SALT', '{{ lookup('password', '/dev/null chars=ascii_letters length=64') }}' );
|
||||
define( 'SECURE_AUTH_SALT', '{{ lookup('password', '/dev/null chars=ascii_letters length=64') }}' );
|
||||
define( 'LOGGED_IN_SALT', '{{ lookup('password', '/dev/null chars=ascii_letters length=64') }}' );
|
||||
define( 'NONCE_SALT', '{{ lookup('password', '/dev/null chars=ascii_letters length=64') }}' );
|
||||
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* WordPress Database Table prefix.
|
||||
*
|
||||
* You can have multiple installations in one database if you give each
|
||||
* a unique prefix. Only numbers, letters, and underscores please!
|
||||
*/
|
||||
$table_prefix = 'wp_';
|
||||
|
||||
/**
|
||||
* For developers: WordPress debugging mode.
|
||||
*
|
||||
* Change this to true to enable the display of notices during development.
|
||||
* It is strongly recommended that plugin and theme developers use WP_DEBUG
|
||||
* in their development environments.
|
||||
*
|
||||
* For information on other constants that can be used for debugging,
|
||||
* visit the Codex.
|
||||
*
|
||||
* @link https://codex.wordpress.org/Debugging_in_WordPress
|
||||
*/
|
||||
define( 'WP_DEBUG', false );
|
||||
|
||||
/* That's all, stop editing! Happy publishing. */
|
||||
|
||||
/** Absolute path to the WordPress directory. */
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
define( 'ABSPATH', dirname( __FILE__ ) . '/' );
|
||||
}
|
||||
//** behind apache proxy */
|
||||
//if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
|
||||
// $_SERVER['HTTPS'] = 'on';
|
||||
//}
|
||||
|
||||
/** Sets up WordPress vars and included files. */
|
||||
require_once( ABSPATH . 'wp-settings.php' );
|
||||
Loading…
x
Reference in New Issue
Block a user