Projet 42: Sujet: Conteneuriser un serveur wordpress à l'aide de docker, alpine/debian, nginx et mariadb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

67 lines
1.1 KiB

version: '3.8'
networks:
local:
services:
mariadb:
build: mariadb/
container_name: mariadb
ports:
- 3306:3306
volumes:
- "/home/narnaud/data/mariadb:/var/lib/mysql"
networks:
- local
restart: always
env_file: .env
redis:
build: bonus/redis
container_name: redis
ports:
- 6379:6379
networks:
- local
restart: always
hexo:
build: bonus/hexo/
container_name: hexo
volumes:
- '/home/narnaud/data/www:/var/www'
networks:
- local
env_file: .env
wordpress:
build: wordpress/
container_name: wordpress
depends_on:
- mariadb
- redis
ports:
- 9000:9000
- 4000:4000
volumes:
- '/home/narnaud/data/www:/var/www'
networks:
- local
restart: always
env_file: .env
nginx:
build: nginx/
container_name: nginx
depends_on:
- wordpress
- hexo
ports:
- 80:80
- 443:443
volumes:
- '/home/narnaud/data/www:/var/www'
- '/home/narnaud/data/logs:/var/log/nginx'
networks:
- local
restart: always