Deploy MPA WordPress
This commit is contained in:
parent
48ce596393
commit
e6486d8d1a
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=MPA Wordpress (Compose Service)
|
||||||
|
Requires=docker.service
|
||||||
|
After=docker.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/opt/mpa_wordpress
|
||||||
|
ExecStart=/usr/bin/docker-compose --project-name mpa-wp up
|
||||||
|
ExecStop=/usr/bin/docker-compose --project-name mpa-wp down
|
||||||
|
TimeoutStartSec=0
|
||||||
|
Restart=on-failure
|
||||||
|
StartLimitIntervalSec=60
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: mariadb:10.10.2
|
||||||
|
volumes:
|
||||||
|
- db_data:/var/lib/mysql
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
|
||||||
|
MARIADB_USER: ${MARIADB_USER}
|
||||||
|
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
|
||||||
|
MARIADB_DATABASE: ${MARIADB_DATABASE}
|
||||||
|
|
||||||
|
wordpress:
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
image: wordpress:6.1.1
|
||||||
|
volumes:
|
||||||
|
- wordpress_data:/var/www/html
|
||||||
|
ports:
|
||||||
|
- "8008:80"
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
WORDPRESS_DB_HOST: db
|
||||||
|
WORDPRESS_DB_USER: ${MARIADB_USER}
|
||||||
|
WORDPRESS_DB_PASSWORD: ${MARIADB_PASSWORD}
|
||||||
|
WORDPRESS_DB_NAME: ${MARIADB_DATABASE}
|
||||||
|
volumes:
|
||||||
|
db_data: {}
|
||||||
|
wordpress_data: {}
|
Loading…
Reference in New Issue