Skip to content

Commit

Permalink
DevContainer para temii
Browse files Browse the repository at this point in the history
  • Loading branch information
Scot3004 committed Aug 12, 2023
1 parent cde7199 commit cdab73c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "Selenium Tests",
"dockerComposeFile": ["local.yml", "docker-compose.extend.yml"],
"service": "workspace",
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspace/",
"forwardPorts": [8000],
"onCreateCommand": "pip install -r requirements/local.txt",
"postAttachCommand": "python -m pytest",
"remoteEnv": {
"DATABASE_URL": "postgres://${containerEnv:POSTGRES_USER}:${containerEnv:POSTGRES_PASSWORD}@${containerEnv:POSTGRES_HOST}:${containerEnv:POSTGRES_PORT}/${containerEnv:POSTGRES_DB}"
},
"customizations": {
"codespaces": {
"openFiles": []
},
"vscode": {
"settings": {
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
},
"extensions": ["ms-python.python"]
}
}
}
12 changes: 12 additions & 0 deletions docker-compose.extend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'
services:
workspace:
image: mcr.microsoft.com/vscode/devcontainers/python:3.11
volumes:
# Mounts the project folder to '/workspace'. While this file is in .devcontainer,
# mounts are relative to the first file in the list, which is a level up.
- .:/workspace:cached
command: /bin/sh -c "while sleep 1000; do :; done"
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres

0 comments on commit cdab73c

Please sign in to comment.