-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11b69ab
commit 3130fcb
Showing
5 changed files
with
128 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Full stack docker compose | ||
# Remove web/firebase components for prod | ||
|
||
version: '3' | ||
services: | ||
sandbox: | ||
image: nutc-exchange | ||
build: | ||
context: ../.. | ||
dockerfile: exchange/docker/sandbox/Dockerfile | ||
args: | ||
firebase_emulator: "false" | ||
restart: unless-stopped | ||
environment: | ||
- NUTC_EXPOSE_METRICS=1 | ||
command: ["--sandbox"] | ||
|
||
#port: 16124 | ||
webserver: | ||
image: nutc-webserver | ||
build: | ||
context: ../.. | ||
dockerfile: webserver/Dockerfile | ||
restart: unless-stopped | ||
|
||
linter: | ||
image: nutc-linter | ||
restart: unless-stopped | ||
build: | ||
context: ../.. | ||
dockerfile: exchange/docker/linter/Dockerfile | ||
args: | ||
firebase_emulator: "false" | ||
|
||
# Exposed on port 9000 | ||
prometheus: | ||
image: prom/prometheus | ||
volumes: | ||
- ../../exchange/docker/sandbox/prometheus.yml:/etc/prometheus/prometheus.yml | ||
command: | ||
- '--config.file=/etc/prometheus/prometheus.yml' | ||
- '--storage.tsdb.retention.time=12h' | ||
restart: unless-stopped | ||
|
||
reverse-proxy: | ||
image: nginx:latest | ||
ports: | ||
- "26389:80" | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf | ||
restart: unless-stopped | ||
depends_on: | ||
- webserver | ||
- grafana | ||
|
||
grafana: | ||
image: grafana/grafana | ||
restart: unless-stopped | ||
user: "${UID}:${GID}" | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
- GF_SECURITY_ALLOW_EMBEDDING=true | ||
- GF_AUTH_ANONYMOUS_ENABLED=true | ||
- GF_AUTH_ANONYMOUS_ORG_NAME=MAIN | ||
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer | ||
volumes: | ||
- ../../exchange/docker/dev/grafana_data:/var/lib/grafana | ||
# - /var/lib/grafana/grafana.db | ||
# - /var/lib/grafana/alerting |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
user nginx; | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
sendfile on; | ||
keepalive_timeout 65; | ||
|
||
map $http_upgrade $connection_upgrade { | ||
default upgrade; | ||
'' close; | ||
} | ||
|
||
upstream webserver { | ||
server webserver:16124; | ||
} | ||
|
||
upstream grafana { | ||
server grafana:3000; | ||
} | ||
|
||
server { | ||
listen 80; | ||
|
||
location /webserver/ { | ||
rewrite ^/webserver(/.*)$ $1 break; | ||
proxy_pass http://webserver; | ||
proxy_set_header Host $host; | ||
# proxy_http_version 1.1; | ||
# proxy_set_header Upgrade $http_upgrade; | ||
# proxy_set_header Connection "upgrade"; | ||
} | ||
|
||
location / { | ||
proxy_pass http://grafana; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
location /api/live/ { | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection $connection_upgrade; | ||
proxy_set_header Host $host; | ||
proxy_pass http://grafana; | ||
} | ||
} | ||
} |
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
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
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