diff --git a/Website_Containers/lamp_stack/compose.yaml b/Website_Containers/lamp_stack/compose.yaml new file mode 100644 index 0000000..567b180 --- /dev/null +++ b/Website_Containers/lamp_stack/compose.yaml @@ -0,0 +1,34 @@ +services: + web: + image: php:8.4-apache #check the php version you need for your project + #ports: + # - "8086:80" #this line maps your pc port to the container port + depends_on: + - db #this line links this container to the db container + volumes: + - /srv/docker/lamp-stack/html:/var/www/html #this line maps the content of ./html in your pc to the /var/www/html of the container + restart: unless-stopped + + db: + image: mysql:9.3.0 #check the mysql version you need for your project + environment: + MYSQL_ROOT_PASSWORD: password #you can change the mysql root password here + MYSQL_DATABASE: lamp_db #you can change the database name here + volumes: + - /srv/docker/lamp-stack/mysql_data:/var/lib/mysql #this line maps the content of ./mysql_data in your pc to the /var/lib/mysql of the container + restart: unless-stopped + + phpmyadmin: + image: phpmyadmin/phpmyadmin + #ports: + # - "8087:80" #this line maps your pc port to the container port + depends_on: + - db #this line links this container to the db container + environment: + PMA_HOST: db + restart: unless-stopped + +networks: + default: + external: true + name: nginx \ No newline at end of file