2021-07-15 20:53:52 +02:00
|
|
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
|
|
|
// https://github.com/microsoft/vscode-dev-containers/tree/v0.183.0/containers/docker-existing-docker-compose
|
|
|
|
// If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
|
|
|
|
{
|
2021-11-23 09:34:51 +01:00
|
|
|
"name": "PostHog codespaces development environment",
|
2022-05-05 16:05:56 +02:00
|
|
|
"build": {
|
|
|
|
"dockerfile": "Dockerfile",
|
|
|
|
"context": "../",
|
2022-07-25 16:21:00 +02:00
|
|
|
"cacheFrom": "ghcr.io/posthog/posthog/codespaces:master"
|
2022-05-05 16:05:56 +02:00
|
|
|
},
|
|
|
|
"remoteUser": "vscode",
|
2022-07-25 16:21:00 +02:00
|
|
|
"remoteEnv": {
|
|
|
|
"DEBUG": "1",
|
|
|
|
"DATABASE_URL": "postgres://posthog:posthog@localhost:5432/posthog",
|
|
|
|
"KAFKA_ENABLED": "true",
|
|
|
|
"KAFKA_HOSTS": "kafka:9092",
|
|
|
|
"CLICKHOUST_HOST": "localhost",
|
|
|
|
"CLICKHOUSE_DATABASE": "posthog_test",
|
|
|
|
"CLICKHOUSE_VERIFY": "False",
|
2023-04-12 15:47:37 +02:00
|
|
|
"REDIS_URL": "redis://localhost:6379",
|
|
|
|
"SECRET_KEY": "<randomly generated secret key>"
|
2022-07-25 16:21:00 +02:00
|
|
|
},
|
2022-05-05 16:05:56 +02:00
|
|
|
"overrideCommand": false,
|
2023-04-12 16:24:00 +02:00
|
|
|
"mounts": ["source=codespaces-linux-var-lib-docker,target=/var/lib/docker,type=volume"],
|
2022-07-25 16:21:00 +02:00
|
|
|
"runArgs": [
|
|
|
|
"--cap-add=SYS_PTRACE",
|
|
|
|
"--security-opt",
|
|
|
|
"seccomp=unconfined",
|
|
|
|
"--privileged",
|
|
|
|
"--init",
|
|
|
|
"--add-host",
|
|
|
|
"kafka:127.0.0.1"
|
|
|
|
],
|
2023-03-29 18:39:14 +02:00
|
|
|
"workspaceFolder": "/workspaces/posthog",
|
2021-07-15 20:53:52 +02:00
|
|
|
// Set *default* container specific settings.json values on container create.
|
2021-11-23 09:34:51 +01:00
|
|
|
"settings": {
|
|
|
|
/*
|
|
|
|
Python settings
|
|
|
|
*/
|
|
|
|
"python.defaultInterpreterPath": "/usr/local/bin/python",
|
|
|
|
// Configure linting
|
|
|
|
"python.linting.enabled": true,
|
|
|
|
"python.linting.pylintEnabled": false, // We use flake8, disable pylint
|
|
|
|
"python.linting.flake8Enabled": true,
|
|
|
|
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
|
|
|
|
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
|
|
|
|
// Configure formatting
|
|
|
|
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
|
|
|
|
"python.formatting.provider": "black",
|
|
|
|
// Configure testing
|
|
|
|
"python.testing.pytestEnabled": true,
|
|
|
|
"python.testing.pytestPath": "/usr/local/py-utils/bin/pytest"
|
|
|
|
},
|
2021-07-15 20:53:52 +02:00
|
|
|
// Add the IDs of extensions you want installed when the container is created.
|
2022-05-05 16:05:56 +02:00
|
|
|
"extensions": [
|
|
|
|
"ms-python.python",
|
|
|
|
"ms-python.vscode-pylance",
|
|
|
|
"esbenp.prettier-vscode",
|
|
|
|
"ms-azuretools.vscode-docker",
|
|
|
|
"stkb.rewrap",
|
|
|
|
"GitHub.copilot",
|
|
|
|
"KnisterPeter.vscode-github",
|
|
|
|
"eamodio.gitlens",
|
|
|
|
"wix.vscode-import-cost",
|
|
|
|
"Orta.vscode-jest",
|
|
|
|
"ckolkman.vscode-postgres",
|
|
|
|
"mtxr.sqltools",
|
|
|
|
"ultram4rine.sqltools-clickhouse-driver"
|
|
|
|
],
|
2021-11-23 09:34:51 +01:00
|
|
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
2023-04-12 16:24:00 +02:00
|
|
|
"forwardPorts": [8000, 5432, 6379, 8123, 8234, 9000, 9092, 9440, 9009]
|
2021-07-15 20:53:52 +02:00
|
|
|
}
|