Utilisation d'un fichier docker-compose séparé pour la configuration d'Apache.
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
server-php:
|
||||||
|
image: ${APACHE_PHP_VERSION}
|
||||||
|
|
||||||
|
environment:
|
||||||
|
- APACHE_ADMIN_EMAIL=${APACHE_ADMIN_EMAIL}
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- ./www:/var/www/html
|
||||||
|
- ./host/apache/logs:/var/log/apache2
|
||||||
|
- ./host/apache/conf/vhost.conf:/etc/apache2/sites-available/000-default.conf
|
||||||
|
- ./host/apache/conf/apache2.conf:/etc/apache2/conf-enabled/docker.conf
|
||||||
@@ -8,9 +8,9 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./certs/letsencrypt:/letsencrypt
|
- ./certs/letsencrypt:/letsencrypt
|
||||||
|
|
||||||
apache-php:
|
server-php:
|
||||||
labels:
|
labels:
|
||||||
- "traefik.http.routers.${CONTAINER_PREFIX}_php.tls.certresolver=letsencrypt"
|
- "traefik.http.routers.${CONTAINER_PREFIX}_server_php.tls.certresolver=letsencrypt"
|
||||||
|
|
||||||
phpmyadmin:
|
phpmyadmin:
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
+6
-16
@@ -23,27 +23,18 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
# Configuration d'Apache et de PHP
|
# Configuration du serveur PHP
|
||||||
apache-php:
|
server-php:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
container_name: ${CONTAINER_PREFIX}_apache_php
|
container_name: ${CONTAINER_PREFIX}_server_php
|
||||||
image: ${APACHE_PHP_VERSION}
|
|
||||||
environment:
|
|
||||||
- APACHE_ADMIN_EMAIL=${APACHE_ADMIN_EMAIL}
|
|
||||||
volumes:
|
|
||||||
- ./www:/var/www/html
|
|
||||||
- ./host/apache/logs:/var/log/apache2
|
|
||||||
- ./host/apache/conf/vhost.conf:/etc/apache2/sites-available/000-default.conf
|
|
||||||
- ./host/apache/conf/apache2.conf:/etc/apache2/conf-enabled/docker.conf
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.docker.network=frontend
|
- traefik.docker.network=frontend
|
||||||
- traefik.http.routers.${CONTAINER_PREFIX}_apache_php.rule=Host(`${PROJECT_URL}`)
|
- traefik.http.routers.${CONTAINER_PREFIX}_server_php.rule=Host(`${PROJECT_URL}`)
|
||||||
- traefik.http.routers.${CONTAINER_PREFIX}_apache_php.entrypoints=web
|
- traefik.http.routers.${CONTAINER_PREFIX}_server_php.entrypoints=websecure
|
||||||
- traefik.http.routers.${CONTAINER_PREFIX}_apache_php.entrypoints=websecure
|
- traefik.http.routers.${CONTAINER_PREFIX}_server_php.tls=true
|
||||||
- traefik.http.routers.${CONTAINER_PREFIX}_apache_php.tls=true
|
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
@@ -59,7 +50,6 @@ services:
|
|||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.docker.network=frontend
|
- traefik.docker.network=frontend
|
||||||
- traefik.http.routers.${CONTAINER_PREFIX}_pma.rule=Host(`${PHPMYADMIN_URL}`)
|
- traefik.http.routers.${CONTAINER_PREFIX}_pma.rule=Host(`${PHPMYADMIN_URL}`)
|
||||||
- traefik.http.routers.${CONTAINER_PREFIX}_pma.entrypoints=web
|
|
||||||
- traefik.http.routers.${CONTAINER_PREFIX}_pma.entrypoints=websecure
|
- traefik.http.routers.${CONTAINER_PREFIX}_pma.entrypoints=websecure
|
||||||
- traefik.http.routers.${CONTAINER_PREFIX}_pma.tls=true
|
- traefik.http.routers.${CONTAINER_PREFIX}_pma.tls=true
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user