first commit
This commit is contained in:
commit
bfaec36f96
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.env
|
||||
35
docker-compose.yml
Normal file
35
docker-compose.yml
Normal file
@ -0,0 +1,35 @@
|
||||
version: "3.3"
|
||||
services:
|
||||
phpmyadmin:
|
||||
image: phpmyadmin
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:80
|
||||
env_file:
|
||||
- .env
|
||||
links:
|
||||
- db:db
|
||||
|
||||
wordpress:
|
||||
image: wordpress:latest
|
||||
restart: always
|
||||
ports:
|
||||
- 8081:80
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- wordpress:/var/www/html
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: mysql:latest
|
||||
restart: always
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
|
||||
volumes:
|
||||
wordpress:
|
||||
db:
|
||||
21
playbook.yml
Normal file
21
playbook.yml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: Deploy WordPress
|
||||
hosts: web
|
||||
become: true
|
||||
tasks:
|
||||
- name: Install Docker
|
||||
apt:
|
||||
name: docker.io
|
||||
state: present
|
||||
|
||||
- name: Install Docker Compose
|
||||
pip:
|
||||
name: docker-compose
|
||||
|
||||
- name: Copy Docker Compose file
|
||||
copy:
|
||||
src: /path/to/docker-compose.yml
|
||||
dest: /home/user/docker-compose.yml
|
||||
|
||||
- name: Start Docker containers
|
||||
command: docker-compose up -d
|
||||
Loading…
Reference in New Issue
Block a user