first_assignment
This commit is contained in:
commit
62f11a2efb
40
z1/docker-compose.yml
Executable file
40
z1/docker-compose.yml
Executable file
@ -0,0 +1,40 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mysql:5.7
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=jawad@password123
|
||||
- MYSQL_DATABASE=cloud_database
|
||||
- MYSQL_USER=jawad1
|
||||
- MYSQL_PASSWORD=jawad@password123
|
||||
networks:
|
||||
- wordpress_network
|
||||
|
||||
wordpress_app:
|
||||
image: wordpress:latest
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- "8080:80"
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- WORDPRESS_DB_HOST=db
|
||||
- WORDPRESS_DB_USER=jawad1
|
||||
- WORDPRESS_DB_PASSWORD=jawad@password123
|
||||
- WORDPRESS_DB_NAME=cloud_database
|
||||
- WORDPRESS_CONFIG_EXTRA=define('WP_SITEURL', 'http://localhost:8080'); define('WP_HOME', 'http://localhost:8080');
|
||||
volumes:
|
||||
- wordpress_data:/var/www/html
|
||||
networks:
|
||||
- wordpress_network
|
||||
|
||||
networks:
|
||||
wordpress_network:
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
wordpress_data:
|
9
z1/prepare-app.sh
Executable file
9
z1/prepare-app.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Preparing app..."
|
||||
|
||||
echo "Downloading Docker images..."
|
||||
docker pull wordpress:latest
|
||||
docker pull mysql:5.7
|
||||
|
||||
echo "Preparation complete. Ready to start the application."
|
5
z1/remove-app.sh
Executable file
5
z1/remove-app.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
echo "Removing app..."
|
||||
|
||||
docker-compose down -v
|
||||
echo "Removed app."
|
5
z1/start-app.sh
Executable file
5
z1/start-app.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
echo "Running app..."
|
||||
|
||||
docker-compose up -d
|
||||
echo "The app is available at http://localhost:8080"
|
5
z1/stop-app.sh
Executable file
5
z1/stop-app.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
echo "Stopping app..."
|
||||
|
||||
docker-compose stop
|
||||
echo "Application stopped. You can restart it using ./start-app.sh"
|
Loading…
Reference in New Issue
Block a user