-
-
Save mikeywaites/c3747efa6cf6edc2b267 to your computer and use it in GitHub Desktop.
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
.htpasswd: | |
file.managed: | |
- mode: 0600 | |
- name: /etc/app/.htpasswd | |
- source: salt://app/files/.htpasswd | |
- require: | |
- stateconf: app.directories::goal | |
dockerfile/nginx: | |
docker.pulled: | |
- tag: latest | |
nginx-container: | |
docker.installed: | |
- name: nginx-app | |
- hostname: nginx | |
- image: dockerfile/nginx | |
- volumes: | |
- /etc/app/.htpasswd: /etc/nginx/certs/.htpasswd | |
- require_in: .nginx-app | |
nginx-absent: | |
cmd.wait: | |
- name: docker rm -f nginx-app | |
- watch: | |
- docker: dockerfile/nginx | |
nginx-app: | |
docker.running: | |
- container: nginx-app | |
- port_bindings: | |
"80/tcp": | |
HostIp: "" | |
HostPort: "80" | |
"443/tcp": | |
HostIp: "" | |
HostPort: "443" | |
- volumes: | |
- /etc/app/.htpasswd: /etc/nginx/certs/.htpasswd |
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
[{ | |
"AppArmorProfile": "", | |
"Args": [], | |
"Config": { | |
"AttachStderr": false, | |
"AttachStdin": false, | |
"AttachStdout": false, | |
"Cmd": [ | |
"nginx" | |
], | |
"CpuShares": 0, | |
"Cpuset": "", | |
"Domainname": "", | |
"Entrypoint": null, | |
"Env": [ | |
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", | |
"HOME=/root" | |
], | |
"ExposedPorts": { | |
"443/tcp": {}, | |
"80/tcp": {} | |
}, | |
"Hostname": "nginx", | |
"Image": "dockerfile/nginx", | |
"MacAddress": "", | |
"Memory": 0, | |
"MemorySwap": 0, | |
"NetworkDisabled": false, | |
"OnBuild": null, | |
"OpenStdin": false, | |
"PortSpecs": null, | |
"StdinOnce": false, | |
"Tty": false, | |
"User": "", | |
"Volumes": { | |
"/etc/nginx/certs": {}, | |
"/etc/nginx/conf.d": {}, | |
"/etc/nginx/sites-enabled": {}, | |
"/var/log/nginx": {}, | |
"/var/www/html": {} | |
}, | |
"WorkingDir": "/etc/nginx" | |
}, | |
"Created": "2015-01-25T14:22:10.181086575Z", | |
"Driver": "devicemapper", | |
"ExecDriver": "native-0.2", | |
"HostConfig": { | |
"Binds": null, | |
"CapAdd": null, | |
"CapDrop": null, | |
"ContainerIDFile": "", | |
"Devices": null, | |
"Devices": null, [5/1984] | |
"Dns": null, | |
"DnsSearch": null, | |
"ExtraHosts": null, | |
"IpcMode": "", | |
"Links": null, | |
"LxcConf": null, | |
"NetworkMode": "", | |
"PortBindings": null, | |
"Privileged": false, | |
"PublishAllPorts": false, | |
"RestartPolicy": { | |
"MaximumRetryCount": 0, | |
"Name": "" | |
}, | |
"SecurityOpt": null, | |
"VolumesFrom": null | |
}, | |
"HostnamePath": "/var/lib/docker/containers/781398900d75393c3926fccfa027730f0c26e4e9e71e8474b7c10891cd5a81ce/hostname", | |
"HostsPath": "/var/lib/docker/containers/781398900d75393c3926fccfa027730f0c26e4e9e71e8474b7c10891cd5a81ce/hosts", | |
"Id": "781398900d75393c3926fccfa027730f0c26e4e9e71e8474b7c10891cd5a81ce", | |
"Image": "7315eff47d8c4a03eeb0b2d409fbaae2ac1b91fca8f526883469e75859229f14", | |
"MountLabel": "", | |
"Name": "/nginx-app", | |
"NetworkSettings": { | |
"Bridge": "docker0", | |
"Gateway": "172.17.42.1", | |
"IPAddress": "172.17.0.62", | |
"IPPrefixLen": 16, | |
"MacAddress": "02:42:ac:11:00:3e", | |
"PortMapping": null, | |
"Ports": { | |
"443/tcp": null, | |
"80/tcp": null | |
} | |
}, | |
"Path": "nginx", | |
"ProcessLabel": "", | |
"ResolvConfPath": "/var/lib/docker/containers/781398900d75393c3926fccfa027730f0c26e4e9e71e8474b7c10891cd5a81ce/resolv.conf", | |
"State": { | |
"Error": "", | |
"ExitCode": 0, | |
"FinishedAt": "0001-01-01T00:00:00Z", | |
"OOMKilled": false, | |
"Paused": false, | |
"Pid": 18488, | |
"Restarting": false, | |
"Running": true, | |
"StartedAt": "2015-01-25T14:22:10.843390809Z" | |
}, | |
"Volumes": { | |
"/etc/nginx/certs": "/var/lib/docker/vfs/dir/9d6551cc3970a6cd1769a3ac03fc329e0fbe637a59c2111f64ae9f0ea3730d62", | |
"/etc/nginx/conf.d": "/var/lib/docker/vfs/dir/656fcb97949b95caf4526c114c015334d1c89892a236c670371ca1b1cecc0320", | |
"/etc/nginx/sites-enabled": "/var/lib/docker/vfs/dir/86b99e87efd6deb08cfee876e818737eedb6e463807f9aac4ca62e7143440558", | |
"/var/log/nginx": "/var/lib/docker/vfs/dir/17fc1ff24fb6fc9c0c9e0c16f39e2ab2067e05daf308e80b44c8e72b41fc6d89", | |
"/var/www/html": "/var/lib/docker/vfs/dir/94eb5442bf8408546b933164f5bd485d434e1f9d44b139eff58e85210176d8fb" | |
}, | |
"VolumesRW": { | |
"/etc/nginx/certs": true, | |
"/etc/nginx/conf.d": true, | |
"/etc/nginx/sites-enabled": true, | |
"/var/log/nginx": true, | |
"/var/www/html": true | |
} | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check my fork and copy-paste
https://gist.github.com/rawkode/deba0ddb02ecfe4d811f