feat: Wordpress deployment files added
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
.env
|
||||||
|
wordpress_data
|
||||||
4
deploy/.env.example
Normal file
4
deploy/.env.example
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
MYSQL_DATABASE=
|
||||||
|
MYSQL_USER=
|
||||||
|
MYSQL_PASSWORD=
|
||||||
|
MYSQL_ROOT_PASSWORD=
|
||||||
1
deploy/deploy.sh
Executable file
1
deploy/deploy.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
docker compose --env-file .env -f docker-compose.yml up --build -d
|
||||||
42
deploy/docker-compose.yml
Normal file
42
deploy/docker-compose.yml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: mysql:8.0
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||||
|
MYSQL_USER: ${MYSQL_USER}
|
||||||
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- db_data:/var/lib/mysql
|
||||||
|
command: --default-authentication-plugin=mysql_native_password
|
||||||
|
|
||||||
|
wordpress:
|
||||||
|
image: wordpress:latest
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
- mailhog
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "8000:80"
|
||||||
|
environment:
|
||||||
|
WORDPRESS_DB_HOST: db:3306
|
||||||
|
WORDPRESS_DB_NAME: ${MYSQL_DATABASE}
|
||||||
|
WORDPRESS_DB_USER: ${MYSQL_USER}
|
||||||
|
WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
|
WORDPRESS_SMTP_HOST: mailhog
|
||||||
|
WORDPRESS_SMTP_PORT: 1025
|
||||||
|
volumes:
|
||||||
|
- ./wordpress_data:/var/www/html
|
||||||
|
|
||||||
|
mailhog:
|
||||||
|
image: mailhog/mailhog:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "8025:8025" # Web UI
|
||||||
|
- "1025:1025" # SMTP
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db_data:
|
||||||
Reference in New Issue
Block a user