version: '3.8'

services:
  wordpress:
    image: gitlab.noris.net:5050/smartika/aop1-projekte:latests
    restart: unless-stopped
    ports:
      - "1337:80"
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
    depends_on:
      - db
    volumes:
      - ./wordpress_data:/data

  db:
    image: harbor.noris.net/docker.io/library/mariadb:11
    restart: unless-stopped
    environment:
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
      MYSQL_ROOT_PASSWORD: rootpassword
    volumes:
      - ./db_data:/var/lib/mysql
