server-dotfiles/kodokanjudoeste/docker-compose.yaml

60 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2025-02-16 17:48:53 +01:00
services:
app:
image: wordpress:6.7-php8.1-apache
restart: unless-stopped
networks:
- proxy
- internal
env_file:
- .db.env
- .proxy.env
- .wordpress.env
volumes:
2025-02-16 19:28:24 +01:00
- data:/var/www/html
healthcheck:
test: "test \"$(curl -Lso /dev/null -w''%{http_code}'' http://localhost:80)\" = \"200\""
start_period: 5s
interval: 60s
timeout: 10s
retries: 3
2025-02-16 17:48:53 +01:00
depends_on:
db:
condition: service_healthy
2025-02-16 17:48:53 +01:00
db:
image: mysql:8.4-oracle
2025-02-16 17:48:53 +01:00
restart: unless-stopped
healthcheck:
test: "mysql $$MYSQL_DATABASE -u$$MYSQL_USER -p$$MYSQL_PASSWORD -e 'SELECT 1;'"
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
2025-02-16 17:48:53 +01:00
networks:
- internal
env_file:
- .db.env
volumes:
# Enable ONLY for importing the db again
# - ./import:/docker-entrypoint-initdb.d:ro
- db:/var/lib/mysql
2025-02-16 17:48:53 +01:00
networks:
proxy:
external: true
internal:
volumes:
db:
driver: local
driver_opts:
type: none
o: bind
device: "/srv/docker/kodokanjudoeste/db"
data:
driver: local
driver_opts:
type: none
o: bind
device: "/srv/docker/kodokanjudoeste/data"