- download these two files to the same directory
- docker-compose up
- http://localhost should show you "it works" which is apache being reverse-proxied through nginx
- docker sets up DNS for
web
based on compose service name so the nginx front-end can find http://web - proxy is set to listen on public port 80 on host so it'll receive incoming traffic, then push to httpd
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
import os | |
import glob | |
import numpy as np | |
#goal: when I have a directory structure that looks like this: | |
# -data | |
# -cats(contains all cat images) | |
# -dogs(contains all dog images) | |
# -elephants(contains all elephant images) | |
# |
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
docker exec -it container-name redis-cli FLUSHALL |
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
//using System; | |
//using System.IO; | |
var initDir = @"H:\1"; | |
var destDir = @"H:\2"; | |
var watcher = new FileSystemWatcher(initDir); | |
Func<string, string> destPath = path => path.Replace(initDir, destDir); | |
watcher.Changed += (sender, eventArgs) => File.Copy(eventArgs.FullPath, destPath(eventArgs.FullPath), overwrite: true); | |
watcher.Deleted += (sender, eventArgs) => File.Delete(destPath(eventArgs.FullPath)); | |
watcher.Renamed += (sender, eventArgs) => |
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
{# style 1 - long form #} | |
{% if filepath == '/var/opt/tomcat_1' %} | |
{% set tomcat_value = tomcat_1_value %} | |
{% else %} | |
{% set tomcat_value = tomcat_2_value %} | |
{% endif %} | |
{# style 2 - short form #} | |
{% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %} |
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
set $ssl off; | |
if ($scheme = https) { | |
set $ssl on; | |
} | |
proxy_set_header X-Forwarded-Ssl $ssl; |