diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..1e223d8ef --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,5 @@ +FROM ghcr.io/goauthentik/server:latest + +USER root + +RUN pip install --no-cache-dir -r /requirements-dev.txt diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..44155bf85 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,34 @@ +{ + "name": "authentik", + "dockerComposeFile": "docker-compose.yml", + "service": "app", + "workspaceFolder": "/authentik", + "features": { + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, + "ghcr.io/devcontainers/features/go:1": {}, + "ghcr.io/devcontainers/features/node:1": {} + }, + "forwardPorts": [9000], + "customizations": { + "vscode": { + "extensions": [ + "EditorConfig.EditorConfig", + "bashmish.es6-string-css", + "bpruitt-goddard.mermaid-markdown-syntax-highlighting", + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "golang.go", + "Gruntfuggly.todo-tree", + "mechatroner.rainbow-csv", + "ms-python.black-formatter", + "ms-python.isort", + "ms-python.pylint", + "ms-python.python", + "ms-python.vscode-pylance", + "redhat.vscode-yaml", + "Tobermory.es6-string-html", + "unifiedjs.vscode-mdx" + ] + } + } +} diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 000000000..378cfb04c --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,27 @@ +version: '3.8' + +services: + app: + build: + context: .. + dockerfile: .devcontainer/Dockerfile + volumes: + - ../:/authentik:cached + command: debug + db: + image: docker.io/library/postgres:15 + restart: unless-stopped + volumes: + - postgres-data:/var/lib/postgresql/data + network_mode: service:app + environment: + POSTGRES_USER: postgres + POSTGRES_DB: postgres + POSTGRES_PASSWORD: postgres + redis: + image: docker.io/redis/redis-stack-server + restart: unless-stopped + network_mode: service:app + +volumes: + postgres-data: