jupyterhub-deploy-docker/makefile
Michael Pilosov fd5d5111db
Carme (#5)
* changed settings for personal hub.

* htop added to singleuser.

* better singleuser.

* config updated.

* bad merge.

* standard updates.

* updates to builds.

* updated.

* updated path.

* loc

* stable build!

* lab enabled.

* dockerspawner bug fix.

* stable upgrade.

* remove env ending.

* minimal installation script with python 2.

* git enabled.

* env.

* upgraded hub for hartke.

* setting cull idle servers.

* default upgrade now working.

* options.

* tweaks for personal settings.

* personalization.

* update.

* attempting full latex build.

* lab build.

* typo

* separated layers.

* got a fancy environment working

* allspark.

* updated personal hub settings.

* allspark done.

* updates. tflow.

* octave deps.

* rstudio and redundancy cleanup.

* WIP

* everything WORKS!!!

* stable state with updates.

* stuff to improve the experience.

* merge.

* working state.

* settings.

* settings for carme, successful build

* settings tweaked for lab, sudo, debugger

* working on carme

* upgrade to python 3.9 and remove conda install steps

* updates

* major cleanup (#6)

* update for slalom

* disable options and grant sudo to all

* vscode launcher

* default url

* pkgs

* config

* updates

* typo

* update

* dont mount extras

* update info in config

* adding install scripts, cleaning up dockerfile

* refactor class

* clean up logic

* carme

* upgrades

* update

* swap order

* spacing

* updates

* paths

* rearranging

* cleanup

* lsp

* cleanup

* culler service update

* unecessary option

* more unecessary args

* Update .env

* monitoring

Co-authored-by: mathematicalmichael <mpilosov@gmail.com>
2021-11-27 19:01:30 -07:00

63 lines
1.8 KiB
Makefile
Executable File

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
include .env
.DEFAULT_GOAL=build
network:
@docker network inspect $(HUB_NAME)-network >/dev/null 2>&1 || docker network create $(HUB_NAME)-network
volumes:
@docker volume inspect $(HUB_NAME)-data >/dev/null 2>&1 || docker volume create --name $(HUB_NAME)-data
@docker volume inspect $(HUB_NAME)-db-data >/dev/null 2>&1 || docker volume create --name $(HUB_NAME)-db-data
secrets/postgres.env:
@echo "Generating postgres password in $@"
@echo "POSTGRES_PASSWORD=$(shell openssl rand -hex 32)" > $@
secrets/oauth.env:
@echo "Generating hash key in $@"
@echo "HASH_SECRET_KEY=$(shell openssl rand -hex 32)" > $@
login:
@docker run --rm $(HUB_NAME) hashauthpw --length $(PASSWORD_LENGTH) $(USERNAME) $(HASH_SECRET_KEY)
secrets/jupyterhub.crt:
@echo "Need an SSL certificate in secrets/jupyterhub.crt"
@exit 1
secrets/jupyterhub.key:
@echo "Need an SSL key in secrets/jupyterhub.key"
@exit 1
userlist:
@echo "Add usernames, one per line, to ./userlist, such as:"
@echo " zoe admin"
@echo " wash"
@exit 1
# Do not require cert/key files if SECRETS_VOLUME defined
#secrets_volume = $(shell echo $(SECRETS_VOLUME))
#ifeq ($(secrets_volume),)
# cert_files=secrets/jupyterhub.crt secrets/jupyterhub.key
#else
# cert_files=
#endif
check-files: userlist secrets/postgres.env
pull:
docker pull $(DOCKER_NOTEBOOK_IMAGE)
notebook_image: pull singleuser/Dockerfile
docker build -t $(HUB_NAME)-user:latest \
--build-arg JUPYTERHUB_VERSION=$(JUPYTERHUB_VERSION) \
--build-arg DOCKER_NOTEBOOK_IMAGE=$(DOCKER_NOTEBOOK_IMAGE) \
singleuser
build: check-files network volumes secrets/oauth.env secrets/postgres.env
docker-compose build
.PHONY: network volumes check-files pull notebook_image build