Posada en producció web higiene postural

De Wiket
Salta a la navegació Salta a la cerca
version: '3.3'
services:
 wordpress:
   image: wordpress:5.9.2
   restart: always
   ports:
     - 80:80
   environment:
     WORDPRESS_DB_HOST: mysql_db
     WORDPRESS_DB_USER: /run/secrets/user_db_mysql
     WORDPRESS_DB_PASSWORD_FILE: /run/secrets/pass_db_mysql
     WORDPRESS_DB_NAME: /run/secerts/namedb_db_mysql
   secrets:
    - pass_db_mysql
    - user_db_mysql
    - namedb_db_mysql
   volumes:
     - wordpress:/var/www/html
   networks:
     - netwp
   depends_on
     - mysql_db
 mysql_db:
   image: mysql:8.0
   restart: always
   environment:
     MYSQL_DATABASE: polls
     MYSQL_USER: admin
     MYSQL_PASSWORD: Asdqwe123
     MYSQL_RANDOM_ROOT_PASSWORD: '1'
   volumes:
     - db:/var/lib/mysql
   networks:
     - netwp
secrets:
  pass_db_mysql:
    file: cred/passwordsql.txt
  user_db_mysql:
    file: cred/usersql.txt
  namedb_db_mysql:
    file: cred/namedbsql.txt
volumes:
  wordpress:
  db:
networks:
  netwp: