Skip to content

Instantly share code, notes, and snippets.

@cannikin
Created May 19, 2025 18:34
Show Gist options
  • Save cannikin/ae2108b56496e9b5a6db067cfe7afdd1 to your computer and use it in GitHub Desktop.
Save cannikin/ae2108b56496e9b5a6db067cfe7afdd1 to your computer and use it in GitHub Desktop.
Devcontainer config for Redwood apps
name: 'MyApp'
services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ../..:/workspaces:cached
command: sleep infinity
depends_on:
- mysql
networks:
- dev-network
mysql:
image: mysql:8
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: myapp
MYSQL_USER: user
MYSQL_PASSWORD: password
ports:
- "3306:3306"
networks:
- dev-network
networks:
dev-network:
driver: bridge
{
"name": "MyApp",
"dockerComposeFile": "compose.yaml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"forwardPorts": [8910, 8911],
"postCreateCommand": "yarn install",
"customizations": {
"vscode": {
"extensions": []
}
}
}
FROM node:20
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
RUN corepack enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment