Skip to content

Commit

Permalink
Save dev progress
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgigawatt committed Jun 12, 2024
1 parent 64182f6 commit 0cf02bf
Show file tree
Hide file tree
Showing 35 changed files with 22,383 additions and 145 deletions.
2 changes: 0 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#
# .env file: Environment variables for Material for MkDocs configuration.
# This file contains project-specific settings and environment variables used
# to configure the Material for MkDocs service.
#

#
Expand Down
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"ASTERES",
"autohide",
"cheatsheet",
"Floaties",
"fontawesome",
"javascripts",
"linebreak",
Expand All @@ -20,6 +21,7 @@
"mkdocs",
"Nemah",
"pymdownx",
"rosé",
"scottgigawatt",
"superfences",
"tablesort",
Expand Down
56 changes: 24 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#

#
# Makefile targets
# Makefile target names
#
ALL=all
DOWN=down
Expand All @@ -17,52 +17,38 @@ LOGS=logs
OPEN=open
HELP=help
START=start
RUN=run

#
# Docker Compose service name
#
COMPOSE_SERVICE_NAME ?= mkdocs-material

#
# Docker Compose service down timeout
#
COMPOSE_DOWN_TIMEOUT ?= 30

#
# Docker Compose down options
#
COMPOSE_DOWN_OPTIONS ?= --timeout $(COMPOSE_DOWN_TIMEOUT) --rmi all --volumes

#
# Docker Compose build options
# Docker Compose options
#
COMPOSE_SERVICE_NAME ?= mkdocs-material
COMPOSE_DOWN_TIMEOUT ?= 30
COMPOSE_DOWN_OPTIONS ?= --timeout $(COMPOSE_DOWN_TIMEOUT) --rmi all --volumes
COMPOSE_BUILD_OPTIONS ?= --pull --no-cache
COMPOSE_UP_OPTIONS ?= --build --force-recreate --pull always --detach
COMPOSE_LOGS_OPTIONS ?= --follow

#
# Docker Compose up options
#
COMPOSE_UP_OPTIONS ?= --build --force-recreate --pull always --detach

#
# Docker Compose logs options
# Build dependencies
#
COMPOSE_LOGS_OPTIONS ?= --follow
DEPENDENCIES=docker docker-compose

#
# Build dependencies
# Path to Dockerfile
#
DEPENDENCIES=docker docker-compose
DOCKERFILE := docker/Dockerfile

#
# Extract base FROM image from Dockerfile
#
FROM_IMAGE=$(shell awk '/^FROM / { print $$2 }' docker/Dockerfile | sed 's/:.*//' | head -n 1)
FROM_IMAGE=$(shell awk '/^FROM / { print $$2 }' $(DOCKERFILE) | sed 's/:.*//' | head -n 1)

#
# Targets that are not files (i.e. never up-to-date); these will run every
# time the target is called or required.
#
.PHONY: $(ALL) $(DOWN) $(CLEAN) $(BUILD_DEPENDS) $(BUILD) $(UP) $(LOGS) $(OPEN) $(HELP) $(START)
.PHONY: $(ALL) $(DOWN) $(CLEAN) $(BUILD_DEPENDS) $(BUILD) $(UP) $(LOGS) $(OPEN) $(HELP) $(START) $(RUN)

#
# $(ALL): Default makefile target. Builds and starts the service stack.
Expand All @@ -83,10 +69,8 @@ $(DOWN): $(BUILD_DEPENDS)
@echo "\nStopping service $(COMPOSE_SERVICE_NAME)"
docker-compose down $(COMPOSE_DOWN_OPTIONS)

@for i in `docker images -aq "$(FROM_IMAGE)"`; do \
echo "Removing image $$i"; \
docker rmi -f "$$i" || true; \
done
@echo "\nRemoving images based on $(FROM_IMAGE)"
@docker images -q "$(FROM_IMAGE)" | xargs -r docker rmi -f || true

#
# $(BUILD): Builds the service stack.
Expand Down Expand Up @@ -134,6 +118,7 @@ $(HELP):
@echo " $(START) - Alias for $(UP)."
@echo " $(LOGS) - Shows logs for the service."
@echo " $(OPEN) - Opens the service site in the default web browser."
@echo " $(RUN) - Alias for $(UP), $(OPEN), $(LOGS)."
@echo " $(HELP) - Displays this help message."

#
Expand All @@ -145,3 +130,10 @@ $(CLEAN): $(DOWN)
# Alias for up
#
$(START): $(UP)

#
# $(RUN): Alias for up, open, logs
#
$(RUN): $(UP)
@$(MAKE) $(OPEN)
@$(MAKE) $(LOGS)
24 changes: 14 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# For more information about Material for MkDocs, visit: https://squidfunk.github.io/mkdocs-material/
#

---

#
# Docker Compose version on the target system
#
Expand All @@ -23,16 +25,18 @@ services:
#
mkdocs-material:
# Docker image build and container information
image: ${MKDOCS_IMAGE}:${MKDOCS_TAG} # Set build image name and tag
build: # Build to install additional plugins
context: docker # Docker build context
dockerfile: Dockerfile # Dockerfile to use for the build
args: # Build arguments passed to Dockerfile
MKDOCS_TAG: ${MKDOCS_TAG} # Specify FROM base image tag as a build argument
container_name: mkdocs-material-${MKDOCS_TAG} # Append Docker image tag to container name
restart: unless-stopped # Restart the container unless explicitly stopped
network_mode: bridge # Use the default bridge network
hostname: mkdocs-material # Set the container hostname
image: ${MKDOCS_IMAGE}:${MKDOCS_TAG} # Set build image name and tag
build: # Build to install additional plugins
context: docker # Docker build context
dockerfile: Dockerfile # Dockerfile to use for the build
args: # Build arguments passed to Dockerfile
MKDOCS_TAG: ${MKDOCS_TAG} # Specify FROM base image tag as a build argument
container_name: mkdocs-material-${MKDOCS_TAG} # Append Docker image tag to container name
restart: unless-stopped # Restart the container unless explicitly stopped
network_mode: bridge # Use the default bridge network
hostname: mkdocs-material # Set the container hostname
labels: # Add container labels
- "com.centurylinklabs.watchtower.enable=false" # Exclude from Watchtower as this image is local

# Define resource limits
mem_limit: ${MKDOCS_MEM_LIMIT}
Expand Down
File renamed without changes
1 change: 1 addition & 0 deletions docs/assets/icons/galaxy-blue-gradient.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
97 changes: 97 additions & 0 deletions docs/assets/icons/galaxy-pink-gradient.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0cf02bf

Please sign in to comment.