Skip to content

Commit

Permalink
Devcontainer testing levantando localhost:5000
Browse files Browse the repository at this point in the history
  • Loading branch information
Scot3004 committed Jun 22, 2024
1 parent 64b956b commit 301570f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 26 deletions.
25 changes: 15 additions & 10 deletions .devcontainer/testing/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
{
"name": "Selenium Tests",
"dockerComposeFile": [
"../../compose.yaml",
"docker-compose.extend.yml"
],
"service": "testing",
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspace/",
"image": "mcr.microsoft.com/vscode/devcontainers/universal",
"hostRequirements": { "cpus": 2 },
"waitFor": "onCreateCommand",
"onCreateCommand": "pipx install lektor && pip install -r test-requirements.txt && npm install",
"postAttachCommand": {
"server": "lektor server",
"css": "npm run watch"
},
"portsAttributes": {
"5000": {
"label": "Lektor Server",
"onAutoForward": "openPreview"
}
},
"forwardPorts": [4444, 5000, 7900],
"onCreateCommand": "pip install -r test-requirements.txt",
"postAttachCommand": "python -m pytest",
"remoteEnv": {
"TEST_COMMAND_EXECUTOR": "http://browser:4444/wd/hub"
"TEST_COMMAND_EXECUTOR": "http://localhost:4444/wd/hub"
},
"customizations": {
"codespaces": {
Expand Down
9 changes: 0 additions & 9 deletions .devcontainer/testing/docker-compose.extend.yml

This file was deleted.

8 changes: 1 addition & 7 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
browser:
image: selenium/standalone-${TEST_BROWSER:-chrome}
Expand All @@ -7,9 +6,4 @@ services:
- 4444:4444 # Selenium service
- 5900:5900 # VNC server
- 7900:7900 # VNC browser client
webapp:
build: ./
ports:
- 5000:5000 # Lektor
volumes:
- .:/app
network_mode: "host"

0 comments on commit 301570f

Please sign in to comment.