Skip to content

Instantly share code, notes, and snippets.

@naviarh
Last active February 13, 2022 12:04
Show Gist options
  • Save naviarh/cda7ebb9619e0b2e01128a623a8ec400 to your computer and use it in GitHub Desktop.
Save naviarh/cda7ebb9619e0b2e01128a623a8ec400 to your computer and use it in GitHub Desktop.
version: "3.7"
services:
wp1:
image: wordpress:php8.1-apache
container_name: wp1
restart: unless-stopped
ports:
- 80:80
volumes:
- "./html:/var/www/html"
environment:
WORDPRESS_DB_HOST: db1
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: user
WORDPRESS_DB_PASSWORD: password
db1:
image: mariadb:10.7.1
container_name: db1
restart: unless-stopped
volumes:
- "./mysql:/var/lib/mysql"
environment:
MYSQL_RANDOM_ROOT_PASSWORD: '1'
MYSQL_DATABASE: wordpress
MYSQL_USER: user
MYSQL_PASSWORD: password
# Адрес сайта: localhost:8001
# Бекап всей системы - архивировать весь каталог
# Развернуть бекап:
# 1. Разархивировать бекап
# 2. docker-compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment