Created
August 26, 2019 18:04
-
-
Save jonathangaldino/d5f0220a8a0a127722cf38b9a9e66d79 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
server { | |
server_name localhost; | |
listen 80; | |
access_log /var/log/nginx/access.log; | |
location / { | |
if ($request_method = OPTIONS) { | |
return 204; | |
} | |
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; | |
add_header 'Access-Control-Allow-Origin' '*' always; | |
add_header 'Access-Control-Allow-Credentials' 'true' always; | |
add_header 'Access-Control-Allow-Headers' 'Content-Type,Accept,Authorization' always; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE' always; | |
proxy_pass http://grafana:3000; | |
} | |
} |
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: | |
mysql: | |
image: mysql | |
container_name: mysql | |
command: --default-authentication-plugin=mysql_native_password | |
restart: always | |
ports: | |
- 3306:3306 | |
volumes: | |
#- <path-to-the-volume>:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: admin | |
MYSQL_DATABASE: dockerdb | |
MYSQL_USER: docker | |
MYSQL_PASSWORD: docker | |
adminer: | |
container_name: adminer | |
image: adminer | |
restart: always | |
ports: | |
- 8089:8080 | |
grafana: | |
image: grafana/grafana | |
container_name: grafana | |
restart: always | |
volumes: | |
- englogic_grafana:/var/lib/grafana | |
ports: | |
- 3000:3000 | |
# proxy: | |
# image: nginx | |
# container_name: proxy | |
# restart: always | |
# ports: | |
# - 80:80 | |
# links: | |
# - grafana | |
# volumes: | |
# - <path-to-nginx-conf>/conf.d:/etc/nginx/conf.d | |
volumes: | |
englogic_mysql: | |
external: false | |
englogic_grafana: | |
external: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment