~busykoala/wp_container_template

001e73fe1ca86c38b23cd837809b5c621176a91c — Matthias Osswald 2 years ago 9133587
Add working with better setup.
2 files changed, 32 insertions(+), 9 deletions(-)

M .gitignore
M docker-compose.yml
M .gitignore => .gitignore +1 -0
@@ 1,1 1,2 @@
.env
/wordpress-files/

M docker-compose.yml => docker-compose.yml +31 -9
@@ 1,15 1,37 @@
version: '2'
version: '3.7'

services:
volumes:
  wp-data:

networks:
  wp-back:

services:
  db:
    image: mysql:5.7
    volumes:
      - wp-data:/var/lib/mysql
    environment:
       MYSQL_ROOT_PASSWORD: rootPassword
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wp-user
       MYSQL_PASSWORD: wp-pass
    ports:
      - 8889:3306
    networks:
      - wp-back
  wordpress:
    depends_on:
      - db
    image: wordpress:latest
    ports:
      - 8080:80
    environment:
      WORDPRESS_DB_PASSWORD: wfehxi148s

  mysql:
    image: mariadb:latest
      - 8888:80
    environment:
      MYSQL_ROOT_PASSWORD: wfehxi148s
       WORDPRESS_DB_HOST: db
       WORDPRESS_DB_USER: wp-user
       WORDPRESS_DB_PASSWORD: wp-pass
    volumes:
      - ./wordpress-files:/var/www/html
    container_name: wordpress-site
    networks:
      - wp-back