dev: test devcontainers

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-04-27 18:10:24 +03:00
parent 8ded11806a
commit 2b7df39504
No known key found for this signature in database
3 changed files with 66 additions and 0 deletions

5
.devcontainer/Dockerfile Normal file
View file

@ -0,0 +1,5 @@
FROM ghcr.io/goauthentik/server:latest
USER root
RUN pip install --no-cache-dir -r /requirements-dev.txt

View file

@ -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"
]
}
}
}

View file

@ -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: