Proxy avec Caddy
This commit is contained in:
@@ -33,6 +33,8 @@ psql -h 127.0.0.1 -d sql -U sql -c "\copy (select id, source, target, cost, reve
|
|||||||
- https://www.kaggle.com/datasets/alexandrelemercier/food-detailed-nutritional-content
|
- https://www.kaggle.com/datasets/alexandrelemercier/food-detailed-nutritional-content
|
||||||
|
|
||||||
|
|
||||||
|
### Proxy
|
||||||
|
|
||||||
### Administration
|
### Administration
|
||||||
|
|
||||||
pgAdmin est un outil d’administration et de gestion pour PostgreSQL.
|
pgAdmin est un outil d’administration et de gestion pour PostgreSQL.
|
||||||
|
|||||||
61
compose.yaml
61
compose.yaml
@@ -1,5 +1,10 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Proxy
|
||||||
|
#
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
# Caddy
|
# Caddy
|
||||||
# Web server, load balancer, and reverse proxy
|
# Web server, load balancer, and reverse proxy
|
||||||
# https://caddyserver.com/
|
# https://caddyserver.com/
|
||||||
@@ -14,12 +19,12 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- caddy_net
|
- caddy_net
|
||||||
environment:
|
environment:
|
||||||
CADDY_INGRESS_NETWORKS: caddy_net
|
CADDY_INGRESS_NETWORKS: ${COMPOSE_PROJECT_NAME}_caddy_net
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/usr/share/caddy
|
- ./data:/usr/share/caddy
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
labels:
|
labels:
|
||||||
caddy_admin: "off"
|
caddy_admin: "on"
|
||||||
|
|
||||||
whoami:
|
whoami:
|
||||||
image: traefik/whoami
|
image: traefik/whoami
|
||||||
@@ -96,20 +101,22 @@ services:
|
|||||||
SUPERSET_CONFIG_PATH: /app/pythonpath/superset_config.py
|
SUPERSET_CONFIG_PATH: /app/pythonpath/superset_config.py
|
||||||
SUPERSET_SECRET_KEY: ${SUPERSET_SECRET:-YOUR_OWN_RANDOM_GENERATED_SECRET_KEY}
|
SUPERSET_SECRET_KEY: ${SUPERSET_SECRET:-YOUR_OWN_RANDOM_GENERATED_SECRET_KEY}
|
||||||
SUPERSET_LOAD_EXAMPLES: no
|
SUPERSET_LOAD_EXAMPLES: no
|
||||||
ports:
|
|
||||||
- "8088:8088"
|
|
||||||
volumes:
|
volumes:
|
||||||
- superset_home:/app/superset_home
|
- superset_home:/app/superset_home
|
||||||
- ./superset_config.py:/app/pythonpath/superset_config.py:Z
|
- ./superset_config.py:/app/pythonpath/superset_config.py:Z
|
||||||
networks:
|
|
||||||
- caddy_net
|
|
||||||
command: >
|
command: >
|
||||||
sh -c "
|
sh -c "
|
||||||
superset db upgrade &&
|
superset db upgrade &&
|
||||||
superset fab create-admin --username admin --firstname Admin --lastname User --email admin@superset.com --password admin &&
|
superset fab create-admin --username admin --firstname Admin --lastname User --email admin@superset.com --password admin &&
|
||||||
superset init &&
|
superset init &&
|
||||||
superset run -h 0.0.0.0 -p 8088 --with-threads --reload --debugger
|
superset run -h 0.0.0.0 -p 80 --with-threads --reload --debugger
|
||||||
"
|
"
|
||||||
|
networks:
|
||||||
|
- caddy_net
|
||||||
|
labels:
|
||||||
|
caddy: superset.localhost
|
||||||
|
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||||
|
caddy.tls: internal
|
||||||
profiles:
|
profiles:
|
||||||
- bi
|
- bi
|
||||||
|
|
||||||
@@ -120,10 +127,6 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
- /dev/urandom:/dev/random:ro
|
- /dev/urandom:/dev/random:ro
|
||||||
ports:
|
|
||||||
- "3000:3000"
|
|
||||||
networks:
|
|
||||||
- caddy_net
|
|
||||||
environment:
|
environment:
|
||||||
MB_DB_TYPE: postgres
|
MB_DB_TYPE: postgres
|
||||||
MB_DB_HOST: ${MB_DB_HOST:-database}
|
MB_DB_HOST: ${MB_DB_HOST:-database}
|
||||||
@@ -141,6 +144,12 @@ services:
|
|||||||
MB_EMAIL_SMTP_HOST: mailpit
|
MB_EMAIL_SMTP_HOST: mailpit
|
||||||
MB_EMAIL_SMTP_PORT: 1025
|
MB_EMAIL_SMTP_PORT: 1025
|
||||||
MB_EMAIL_FROM_ADDRESS: metabase@univ-lorraine.fr
|
MB_EMAIL_FROM_ADDRESS: metabase@univ-lorraine.fr
|
||||||
|
networks:
|
||||||
|
- caddy_net
|
||||||
|
labels:
|
||||||
|
caddy: superset.localhost
|
||||||
|
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||||
|
caddy.tls: internal
|
||||||
profiles:
|
profiles:
|
||||||
- bi
|
- bi
|
||||||
|
|
||||||
@@ -279,27 +288,25 @@ services:
|
|||||||
database:
|
database:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
command: postgrest
|
command: postgrest
|
||||||
ports:
|
|
||||||
- 3005:3005
|
|
||||||
networks:
|
|
||||||
- caddy_net
|
|
||||||
environment:
|
environment:
|
||||||
PGRST_DB_URI: postgres://${POSTGREST_USER:-postgrest}:9012@${POSTGREST_HOST:-database}:${POSTGREST_DB_PORT:-5432}/${COMPOSE_PROJECT_NAME}
|
PGRST_DB_URI: postgres://${POSTGREST_USER:-postgrest}:9012@${POSTGREST_HOST:-database}:${POSTGREST_DB_PORT:-5432}/${COMPOSE_PROJECT_NAME}
|
||||||
PGRST_DB_SCHEMAS: ${POSTGREST_DB_SCHEMAS:-public}
|
PGRST_DB_SCHEMAS: ${POSTGREST_DB_SCHEMAS:-public}
|
||||||
PGRST_DB_ANON_ROLE: ${POSTGREST_DB_ANON_ROLE:-role_web}
|
PGRST_DB_ANON_ROLE: ${POSTGREST_DB_ANON_ROLE:-role_web}
|
||||||
PGRST_JWT_SECRET: ${POSTGREST_JWT_SECRET:-ChangeMeChangeMeChangeMeChangeMe}
|
PGRST_JWT_SECRET: ${POSTGREST_JWT_SECRET:-ChangeMeChangeMeChangeMeChangeMe}
|
||||||
PGRST_ADMIN_SERVER_PORT: 3055
|
PGRST_ADMIN_SERVER_PORT: 3055
|
||||||
PGRST_SERVER_PORT: 3005
|
PGRST_SERVER_PORT: 80
|
||||||
|
networks:
|
||||||
|
- caddy_net
|
||||||
|
labels:
|
||||||
|
caddy: postgrest.localhost
|
||||||
|
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||||
|
caddy.tls: internal
|
||||||
profiles:
|
profiles:
|
||||||
- api
|
- api
|
||||||
|
|
||||||
scalar:
|
scalar:
|
||||||
image: scalarapi/api-reference:0.4.2
|
image: scalarapi/api-reference:0.4.2
|
||||||
ports:
|
|
||||||
- "8080:8080"
|
|
||||||
restart: "no"
|
restart: "no"
|
||||||
networks:
|
|
||||||
- caddy_net
|
|
||||||
environment:
|
environment:
|
||||||
API_REFERENCE_CONFIG: |
|
API_REFERENCE_CONFIG: |
|
||||||
{
|
{
|
||||||
@@ -308,6 +315,12 @@ services:
|
|||||||
],
|
],
|
||||||
"theme": "purple"
|
"theme": "purple"
|
||||||
}
|
}
|
||||||
|
networks:
|
||||||
|
- caddy_net
|
||||||
|
labels:
|
||||||
|
caddy: scalar.localhost
|
||||||
|
caddy.reverse_proxy: "{{upstreams 8080}}"
|
||||||
|
caddy.tls: internal
|
||||||
profiles:
|
profiles:
|
||||||
- api
|
- api
|
||||||
|
|
||||||
@@ -336,8 +349,6 @@ services:
|
|||||||
target: /etc/grafana/dashboards
|
target: /etc/grafana/dashboards
|
||||||
volumes:
|
volumes:
|
||||||
- grafana:/var/lib/grafana
|
- grafana:/var/lib/grafana
|
||||||
ports:
|
|
||||||
- 3000:3000
|
|
||||||
environment:
|
environment:
|
||||||
#GF_SECURITY_ADMIN_EMAIL: ${ADMIN_EMAIL}
|
#GF_SECURITY_ADMIN_EMAIL: ${ADMIN_EMAIL}
|
||||||
#GF_SECURITY_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
|
#GF_SECURITY_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
|
||||||
@@ -348,6 +359,12 @@ services:
|
|||||||
GF_USERS_ALLOW_SIGN_UP: false
|
GF_USERS_ALLOW_SIGN_UP: false
|
||||||
GF_FEATURE_TOGGLES_ENABLE: traceQLStreaming metricsSummary lokiFormatQuery alertmanagerRemoteOnly
|
GF_FEATURE_TOGGLES_ENABLE: traceQLStreaming metricsSummary lokiFormatQuery alertmanagerRemoteOnly
|
||||||
GF_INSTALL_PLUGINS: yesoreyeram-infinity-datasource
|
GF_INSTALL_PLUGINS: yesoreyeram-infinity-datasource
|
||||||
|
networks:
|
||||||
|
- caddy_net
|
||||||
|
labels:
|
||||||
|
caddy: grafana.localhost
|
||||||
|
caddy.reverse_proxy: "{{upstreams 3000}}"
|
||||||
|
caddy.tls: internal
|
||||||
profiles:
|
profiles:
|
||||||
- telemetry
|
- telemetry
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user