Created
February 13, 2017 09:34
-
-
Save MikeMichel/1088bd70165576925825f37a46393936 to your computer and use it in GitHub Desktop.
add a service to a running project
This file contains 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
start following wordpress.yml with | |
sloppy start -var=URI:mywordpress.sloppy.zone -var=DBUSER:wpadmin -var=DBPASS:secret -var=DBROOT:moresecret wordpress.yml | |
wordpress.yml: | |
version: "v1" | |
project: "wordpress" | |
services: | |
frontend: | |
apache: | |
image: "wordpress:4.6.0" | |
instances: 1 | |
mem: 512 | |
domain: "$URI" | |
port: 80 | |
env: | |
- WORDPRESS_DB_HOST: "mysql.backend.wordpress" | |
- WORDPRESS_DB_USER: "$DBUSER" | |
- WORDPRESS_DB_PASSWORD: "$DBPASS" | |
volumes: | |
- path: "/var/www/html" | |
size: "8GB" | |
dependencies: | |
- "../backend/mysql" | |
backend: | |
mysql: | |
image: "mysql" | |
instances: 1 | |
mem: 512 | |
port: 3306 | |
env: | |
- MYSQL_ROOT_PASSWORD: "$DBROOT" | |
- MYSQL_USER: "$DBUSER" | |
- MYSQL_PASSWORD: "$DBPASS" | |
- MYSQL_DATABASE: "wordpress" | |
healthchecks: | |
- type: "TCP" | |
timeout: 20 | |
interval: 10 | |
max_consecutive_failures: 4 | |
grace_period_seconds: 300 | |
volumes: | |
- path: "/var/lib/mysql" | |
size: "8GB" | |
Then edit the yml and add phpmyadmin: | |
version: "v1" | |
project: "wordpress" | |
services: | |
frontend: | |
apache: | |
image: "wordpress:4.6.0" | |
instances: 1 | |
mem: 512 | |
domain: "$URI" | |
port: 80 | |
env: | |
- WORDPRESS_DB_HOST: "mysql.backend.wordpress" | |
- WORDPRESS_DB_USER: "$DBUSER" | |
- WORDPRESS_DB_PASSWORD: "$DBPASS" | |
volumes: | |
- path: "/var/www/html" | |
size: "8GB" | |
dependencies: | |
- "../backend/mysql" | |
backend: | |
mysql: | |
image: "mysql" | |
instances: 1 | |
mem: 512 | |
port: 3306 | |
env: | |
- MYSQL_ROOT_PASSWORD: "$DBROOT" | |
- MYSQL_USER: "$DBUSER" | |
- MYSQL_PASSWORD: "$DBPASS" | |
- MYSQL_DATABASE: "wordpress" | |
healthchecks: | |
- type: "TCP" | |
timeout: 20 | |
interval: 10 | |
max_consecutive_failures: 4 | |
grace_period_seconds: 300 | |
volumes: | |
- path: "/var/lib/mysql" | |
size: "8GB" | |
phpmyadmin: | |
image: "phpmyadmin/phpmyadmin" | |
domain: "padmin.sloppy.zone" | |
instances: 1 | |
mem: 512 | |
port: 80 | |
env: | |
- PMA_HOST: "mysql.backend.wordpress" | |
volumes: | |
- path: "/sessions" | |
Then use "sloppy change" to update the project: | |
sloppy change -var=URI:mywordpress.sloppy.zone -var=DBUSER:wpadmin -var=DBPASS:secret -var=DBROOT:moresecret wordpress-phpmyadmin.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment