Run a simple command:
docker-compose -f docker-compose-wp.yml -d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2' | |
| services: | |
| wordpress: | |
| image: wordpress | |
| volumes: | |
| - ./wp-content/:/var/www/html/wp-content | |
| ports: | |
| - 8080:80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function rs_menu_classes( $classes, $item, $args ) { | |
| if($args->theme_location == 'primary') { | |
| $classes[] = 'list-inline-item'; | |
| } | |
| return $classes; | |
| } | |
| add_filter( 'nav_menu_css_class','atg_menu_classes',1,3 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM wordpress:4.7.3-apache | |
| COPY config/php.ini /usr/local/etc/php/conf.d/ | |
| COPY config/default-ssl.conf /etc/apache2/sites-enabled/default-ssl.conf | |
| VOLUME /etc/ssl/certs/wordpress/ | |
| VOLUME /etc/ssl/private/wordpress/ | |
| RUN a2enmod ssl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2' | |
| volumes: | |
| # Redis Data | |
| redis-data: | |
| driver: local | |
| # Inicio dos serviços | |
| services: | |
| # Banco Maria DB |
Backup simples da pasta /var/lib/mysql de um container Docker para a máquina Host, onde NOME-VOLUME é o nome do volume que foi montado no seu container.
docker run --rm --volumes-from NOME-VOLUME -v $(pwd):/home alpine:3.5 tar cvf /home/mysql.tar /var/lib/mysql
- Run
sudo openssl passwd -1 > cloud-config.ymlto generate a pass
$ cat cloud_config.yml
#cloud-config
users:
- name: raisiqueira
passwd: PASSWORD GENERATE BY OPENSSL
groups:
- sudo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install cmake intltool libgtk-3-dev libssh-dev libavahi-ui-gtk3-dev libvte-2.90-dev libxkbfile-dev |
Rodar o Container do MYSQL
docker run --name dump -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql
Importar .sql para o container:
docker exec -i <CONTAINER> mysql -uroot -pSENHA --database=dump < dump.sql
Exportar um .sql para o host:
#
# Alias for Docker
#
# Development alias
#
# Alias for mongoDB running on Docker
function mongoinit(){
docker run --name mongodb -p 17017:27017 -d mongo
}