mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-21 16:08:21 +00:00
36 lines
942 B
YAML
36 lines
942 B
YAML
version: "3"
|
|
|
|
services:
|
|
mywp:
|
|
image: wordpress:5-apache
|
|
volumes:
|
|
- wp_data:/var/www/html
|
|
networks:
|
|
- bw-services
|
|
environment:
|
|
- WORDPRESS_DB_HOST=mydb
|
|
- WORDPRESS_DB_NAME=wp
|
|
- WORDPRESS_DB_USER=user
|
|
- WORDPRESS_DB_PASSWORD=db-user-pwd # replace with a stronger password (must match MYSQL_PASSWORD)
|
|
- WORDPRESS_TABLE_PREFIX=prefix_ # best practice : replace with a random prefix
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- "node.role==worker"
|
|
labels:
|
|
- bunkerweb.SERVER_NAME=www.example.com
|
|
- bunkerweb.MAX_CLIENT_SIZE=50m
|
|
- bunkerweb.USE_REVERSE_PROXY=yes
|
|
- bunkerweb.REVERSE_PROXY_URL=/
|
|
- bunkerweb.REVERSE_PROXY_HOST=http://mywp
|
|
|
|
# For the database, you can refer to the swarm integration example including a database
|
|
|
|
networks:
|
|
bw-services:
|
|
external:
|
|
name: bw-services
|
|
|
|
volumes:
|
|
wp_data:
|
|
db_data:
|