diff --git a/.gitignore b/.gitignore index 05cc0c3..9c7bc19 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,81 @@ .#* data/* Docker Compose/djankiserv-postgres-nginx/docker-compose.yml + +config/* +!config/.env.example + +# Created by https://www.toptal.com/developers/gitignore/api/windows,linux,macos +# Edit at https://www.toptal.com/developers/gitignore?templates=windows,linux,macos + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/windows,linux,macos \ No newline at end of file diff --git a/Configuration/djankiserv.vars b/Configuration/djankiserv.vars deleted file mode 100644 index e39303a..0000000 --- a/Configuration/djankiserv.vars +++ /dev/null @@ -1,5 +0,0 @@ -export DJANKISERV_VARS_SOURCED="yes" - -export DOCKER_IMAGE="anki-sync-server:djankiserv" -export DOCKER_IMAGE_ORG="ankicommunity" -export DOCKER_ADDITIONAL_BUILD_ARGS="--build-arg INDEX_URL=http://172.17.0.1:8080 --build-arg TRUSTED_HOST=172.17.0.1" \ No newline at end of file diff --git a/Configuration/djankiserv_compose.vars b/Configuration/djankiserv_compose.vars deleted file mode 100644 index becd0e6..0000000 --- a/Configuration/djankiserv_compose.vars +++ /dev/null @@ -1,5 +0,0 @@ -export DJANKISERV_COMPOSE_VARS_SOURCED="yes" - -export DJANKISERV_DATABASE_PASSWORD="PLEASE_CHANGE_POSTGRES_PASSWORD" -export DJANKISERV_DJANGO_SECRET_KEY="a_very_secretive_key" -echo "Please change the credentials in djankiserv_compose.vars first!" \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9517869 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +#!/usr/bin/make + +SHELL := /bin/bash +ANKI_DEVOPS_PATH := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) +ANKI_DEVOPS_NAME ?= "anki-devops-services" +ANKI_DEVOPS_VERSION ?= "v0.1.0" +ANKI_DEVOPS_DESCRIPTION ?= "Images and Containers for Anki Community services." + +ENV := local +-include ${ANKI_DEVOPS_PATH}/config/.env.${ENV} +export + +.DEFAULT_GOAL := help-devops +.PHONY: help-devops #: List available command. +help: help-devops # alias for quick access +help-devops: + @cd "${ANKI_DEVOPS_PATH}" && awk 'BEGIN {FS = " ?#?: "; print ""${ANKI_DEVOPS_NAME}" "${ANKI_DEVOPS_VERSION}"\n"${ANKI_DEVOPS_DESCRIPTION}"\n\nUsage: make \033[36m\033[0m\n\nCommands:"} /^.PHONY: ?[a-zA-Z_-]/ { printf " \033[36m%-10s\033[0m %s\n", $$2, $$3 }' $(MAKEFILE_LIST) + + diff --git a/Testing.md b/TESTING.md similarity index 100% rename from Testing.md rename to TESTING.md diff --git a/config/.env.example b/config/.env.example new file mode 100644 index 0000000..eecd4d2 --- /dev/null +++ b/config/.env.example @@ -0,0 +1,22 @@ +# .env.example (anki-devops-services) +# cp config/.env.example config/.env.local + +## Docker +DOCKER_IMAGE="anki-sync-server:djankiserv" +DOCKER_IMAGE_ORG="ankicommunity" +DOCKER_ADDITIONAL_BUILD_ARGS="--build-arg INDEX_URL=http://172.17.0.1:8080 --build-arg TRUSTED_HOST=172.17.0.1" + +## Djankiserv +### DJANKISERV_VARS_SOURCED="yes" +### DJANKISERV_COMPOSE_VARS_SOURCED="yes" +### DJANKISERV_DATABASE_PASSWORD="PLEASE_CHANGE_POSTGRES_PASSWORD" +### DJANKISERV_DJANGO_SECRET_KEY="a_very_secretive_key" +### DJANKISERV_DATA_ROOT +### DJANKISERV_DEBUG +### DJANKISERV_ALLOWED_HOSTS + +## Django +### DJANGO_SECRET_KEY="a_very_secretive_key" + +## Database +### DATABASE_PASSWORD="PLEASE_CHANGE_POSTGRES_PASSWORD" \ No newline at end of file diff --git a/Configuration/djankiserv_example_config/mysecrets.py b/config/djankiserv_example_config/mysecrets.py similarity index 100% rename from Configuration/djankiserv_example_config/mysecrets.py rename to config/djankiserv_example_config/mysecrets.py diff --git a/Configuration/djankiserv_example_config/settings.py b/config/djankiserv_example_config/settings.py similarity index 100% rename from Configuration/djankiserv_example_config/settings.py rename to config/djankiserv_example_config/settings.py diff --git a/Configuration/djankiserv_example_config/urls.py b/config/djankiserv_example_config/urls.py similarity index 100% rename from Configuration/djankiserv_example_config/urls.py rename to config/djankiserv_example_config/urls.py