File tree Expand file tree Collapse file tree 5 files changed +138
-0
lines changed
Expand file tree Collapse file tree 5 files changed +138
-0
lines changed Original file line number Diff line number Diff line change 1+ DATABASE_IMAGE_NAME=mysql_me
2+ DATABASE_NAME=wordpress
3+ DATABASE_USERNAME=admin
4+ DATABASE_PASSWORD=admin
5+
6+ WORDPRESS_IMAGE_NAME=wordpress_me
Original file line number Diff line number Diff line change 1+ .env
Original file line number Diff line number Diff line change 1+ # Docker con wordpress
2+
3+ *** Idioma***
4+ - 🇪🇸 Español
5+ - [ 🇺🇸 Ingles] ( ./README.md )
6+
7+ # Indice
8+
9+ - [ Variables de entorno] ( #Variables-de-entorno )
10+ - [ Docker compose] ( #Docker-compose )
11+ - [ Referencias] ( #Referencias )
12+ # Variables-de-entorno
13+
14+ Renombrar el archivo ** .envExample** a ** .env** , tu puedes modificar este archivo
15+
16+ # Docker-compose
17+
18+ Ejecuta en el mismo directorio de ** docker-compose.yml**
19+ ``` bash
20+ docker-compose --env-file .env up -d
21+ ```
22+ Verifica por la terminal
23+ ``` bash
24+ docker ps
25+ ```
26+ Verifica por el navegador
27+ - [ localhost:80] ( http://localhost:80 )
28+
29+ Verifica tu mysql por la terminal, y escribe tu ** contraseña root** , Con este ejemplo seria ** admin**
30+ ``` bash
31+ docker exec -it my_mysql mysql -uroot -p
32+ ```
33+
34+ # Referencias
35+
36+ *** Docker Instalación***
37+ - [ Docker installation] ( https://docs.docker.com/engine/install/ )
38+ - [ Docker compose installation] ( https://docs.docker.com/compose/install/ )
39+
40+ *** Docker Documentación***
41+ - [ Docker Environment variables in Composer] ( https://docs.docker.com/compose/environment-variables/ )
42+ - [ Docker compose wordpress] ( https://docs.docker.com/compose/wordpress/ )
43+
44+ *** Imagenes***
45+ - [ mysql] ( https://hub.docker.com/_/mysql )
46+ - [ wordpress] ( https://hub.docker.com/_/wordpress )
47+
48+ *** Otros***
49+ - [ (Medium) Using Variables in Docker-Compose] ( https://medium.com/better-programming/using-variables-in-docker-compose-265a604c2006 )
50+ - [ (Youtube-spanish) MySQL with Docker, step by step] ( https://www.youtube.com/watch?v=SgPPArUJAGs&t=1297s )
Original file line number Diff line number Diff line change 1+ # Docker with wordpress
2+
3+ *** Language***
4+ - [ 🇪🇸 Spanish] ( ./README.es.md )
5+ - 🇺🇸 English
6+
7+ # Indice
8+
9+ - [ Environment variables] ( #Environment-variables )
10+ - [ Docker compose] ( #Docker-compose )
11+ - [ Refence] ( #Reference )
12+
13+ # Environment-variables
14+
15+ Rename file ** .envExample** to ** .env** , you can modify it
16+
17+ # Docker-compose
18+
19+ Run in this same directory as ** docker-compose.yml**
20+ ``` bash
21+ docker-compose --env-file .env up -d
22+ ```
23+ Verify by terminal
24+ ``` bash
25+ docker ps
26+ ```
27+ Check with browser
28+ - [ localhost:80] ( http://localhost:80 )
29+
30+ Check your mysql by terminal, write you ** root password** , with this example would be ** admin**
31+ ``` bash
32+ docker exec -it my_mysql mysql -uroot -p
33+ ```
34+
35+ # Reference
36+
37+ *** Docker Install***
38+ - [ Docker installation] ( https://docs.docker.com/engine/install/ )
39+ - [ Docker compose installation] ( https://docs.docker.com/compose/install/ )
40+
41+ *** Docker Docs***
42+ - [ Docker Environment variables in Composer] ( https://docs.docker.com/compose/environment-variables/ )
43+ - [ Docker compose wordpress] ( https://docs.docker.com/compose/wordpress/ )
44+
45+ *** Images***
46+ - [ mysql] ( https://hub.docker.com/_/mysql )
47+ - [ wordpress] ( https://hub.docker.com/_/wordpress )
48+
49+ *** Other***
50+ - [ (Medium) Using Variables in Docker-Compose] ( https://medium.com/better-programming/using-variables-in-docker-compose-265a604c2006 )
51+ - [ (Youtube-spanish) MySQL with Docker, step by step] ( https://www.youtube.com/watch?v=SgPPArUJAGs&t=1297s )
Original file line number Diff line number Diff line change 1+ version : " 3.3"
2+
3+ services :
4+ db :
5+ image : mysql:5.7
6+ container_name : ${DATABASE_IMAGE_NAME}
7+ volumes :
8+ - db_data:/var/lib/mysql
9+ restart : always
10+ environment :
11+ MYSQL_ROOT_PASSWORD : admin
12+ MYSQL_DATABASE : ${DATABASE_NAME}
13+ MYSQL_USER : ${DATABASE_USERNAME}
14+ MYSQL_PASSWORD : ${DATABASE_PASSWORD}
15+
16+ wordpress :
17+ depends_on :
18+ - db
19+ image : wordpress:5.1.1-php7.3-apache
20+ container_name : ${WORDPRESS_IMAGE_NAME}
21+ ports :
22+ - " 80:80"
23+ restart : always
24+ environment :
25+ WORDPRESS_DB_HOST : db:3306
26+ WORDPRESS_DB_USER : wordpress
27+ WORDPRESS_DB_PASSWORD : wordpress
28+ WORDPRESS_DB_NAME : wordpress
29+ volumes :
30+ db_data : {}
You can’t perform that action at this time.
0 commit comments