Created
July 4, 2018 11:22
-
-
Save thefringeninja/4aa4755e2bb45825869853630019ec2f to your computer and use it in GitHub Desktop.
Sql Stream Store Docker Compose Example
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
version: '3.1' | |
services: | |
nginx: | |
container_name: sql-stream-store-nginx-proxy | |
image: nginx:1.15.0-alpine | |
build: | |
context: ./nginx | |
ports: | |
- "9000:80" | |
networks: | |
- app-network | |
frontend: | |
container_name: sql-stream-store-client | |
image: sql-stream-store-browser | |
ports: | |
- "3000:80" | |
networks: | |
- app-network | |
backend: | |
container_name: sql-stream-store-hal | |
image: sql-stream-store-hal | |
ports: | |
- "5000:80" | |
networks: | |
- app-network | |
networks: | |
app-network: | |
driver: bridge |
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
FROM nginx:1.15.0-alpine | |
COPY ./nginx.conf /etc/nginx/nginx.conf | |
EXPOSE 80 | |
ENTRYPOINT ["nginx", "-g", "daemon off;"] |
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
worker_processes 4; | |
events { worker_connections 1024; } | |
http { | |
sendfile on; | |
upstream frontend { | |
server frontend; | |
} | |
upstream backend { | |
server backend; | |
} | |
map $http_accept $backend { | |
default frontend; | |
"application/hal+json" backend; | |
} | |
server { | |
listen 80; | |
location / { | |
proxy_pass http://$backend$uri; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $server_name; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment