Skip to content

Commit

Permalink
Merge pull request #15 from nelson-lojo/devcontainer-addition
Browse files Browse the repository at this point in the history
Add Devcontainer configs
  • Loading branch information
SybelBlue authored Sep 17, 2024
2 parents 5eed799 + 8447956 commit 6ab358f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/universal
{
"name": "Launch Course",

"dockerComposeFile": [ "docker-compose.yml" ],
"service" : "devcontainer",
"workspaceFolder": "/workspaces/pl-ucb-csxxx",

"forwardPorts": [ 3000 ],

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
},

"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}"
}
22 changes: 22 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:
prairielearn:
image: prairielearn/prairielearn:latest
platform: linux/amd64
environment:
HOST_JOBS_DIR: /tmp/dir-for-ag-jobqueue
ports:
- 3000:3000
volumes:
- /tmp/dir-for-ag-jobqueue:/jobs
- ..:/course
- /var/run/docker.sock:/var/run/docker.sock
extra_hosts:
- "host.docker.internal:host-gateway"

devcontainer:
image: mcr.microsoft.com/devcontainers/universal
platform: linux/amd64
links:
- prairielearn
volumes: # Mount the root folder that contains .git
- ..:/workspaces/pl-ucb-csxxx:rw

0 comments on commit 6ab358f

Please sign in to comment.