Ai
1 Star 1 Fork 0

gitee/jupyterhub-deploy-docker-localhost

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yml 2.94 KB
一键复制 编辑 原始数据 按行查看 历史
Herman Tolentino 提交于 2021-09-26 07:12 +08:00 . updated Docker compose files
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
# JupyterHub docker-compose configuration file
version: "3"
services:
#hub-db:
# build:
# context: .
# dockerfile: server_apps/postgres-hub/Dockerfile.postgres
# args:
# JPY_PSQL_PASSWORD: ${JPY_PSQL_PASSWORD}
# POSTGRES_VERSION: ${POSTGRES_VERSION}
# image: postgres-hub
# container_name: jupyterhub-db
# restart: always
# environment:
# POSTGRES_DB: ${POSTGRES_DB}
# PGDATA: ${DB_VOLUME_CONTAINER}
# JPY_PSQL_PASSWORD: ${JPY_PSQL_PASSWORD}
# POSTGRES_PASSWORD: ${JPY_PSQL_PASSWORD}
# env_file:
# - .env
# volumes:
# - "db:${DB_VOLUME_CONTAINER}"
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U postgres"]
# interval: 30s
# timeout: 30s
# retries: 3
hub:
#depends_on:
# - hub-db
hostname: jupyterhub
build:
context: .
dockerfile: Dockerfile.jupyterhub
args:
JUPYTERHUB_VERSION: ${JUPYTERHUB_VERSION}
JUPYTER_UI: ${JUPYTER_UI}
LOGO_IMAGE: ${LOGO_IMAGE}
restart: always
image: jupyterhub
container_name: jupyterhub
volumes:
# Bind Docker socket on the host so we can connect to the daemon from
# within the container
# use this for Linux
#- "/var/run/docker.sock:/var/run/docker.sock:rw"
# use this for Mac OS
- "/var/run/docker.sock.raw:/var/run/docker.sock"
# Bind Docker volume on host for JupyterHub database and cookie secrets
- "data:${DATA_VOLUME_CONTAINER}"
- "./secrets:/srv/jupyterhub/secrets"
healthcheck:
test: "curl -f -k https://localhost/hub/health || false"
interval: 2m
timeout: 3s
retries: 3
ports:
- "443:443"
- "8000:8000"
#links:
# - hub-db
env_file:
- .env
environment:
# All containers will join this network
DOCKER_NETWORK_NAME: ${DOCKER_NETWORK_NAME}
# JupyterHub will spawn this Notebook image for users
DOCKER_NOTEBOOK_IMAGE: ${LOCAL_NOTEBOOK_IMAGE}
#DOCKER_NOTEBOOK_IMAGE: ${LOCAL_NOTEBOOK_PACKED}
# Notebook directory inside user image
DOCKER_NOTEBOOK_DIR: ${DOCKER_NOTEBOOK_DIR}
# Using this run command (optional)
DOCKER_SPAWN_CMD: ${DOCKER_SPAWN_CMD}
JUPYTERHUB_SERVICE_HOST_IP: ${JUPYTERHUB_SERVICE_HOST_IP}
# Server time out
SERVER_TIMEOUT_SECONDS: ${SERVER_TIMEOUT_SECONDS}
# Postgres db info
#POSTGRES_DB: ${POSTGRES_DB}
#POSTGRES_HOST: hub-db
LETSENCRYPT_HOST: ${JH_FQDN}
LETSENCRYPT_EMAIL: ${JH_EMAIL}
VIRTUAL_HOST: ${JH_FQDN}
VIRTUAL_PORT: ${VIRTUAL_PORT}
command: >
jupyterhub --ip=0.0.0.0 -f /srv/jupyterhub/jupyterhub_config.py --log-level=${JUPYTERHUB_LOG_LEVEL} &>> /var/log/jupyter/jupyterhub.log
volumes:
data:
name: ${DATA_VOLUME_HOST}
db:
name: ${DB_VOLUME_HOST}
networks:
default:
name: ${DOCKER_NETWORK_NAME}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Microbion/jupyterhub-deploy-docker-localhost.git
git@gitee.com:Microbion/jupyterhub-deploy-docker-localhost.git
Microbion
jupyterhub-deploy-docker-localhost
jupyterhub-deploy-docker-localhost
master

搜索帮助