Skip to content

Commit

Permalink
feat: upgraded devcontainer + local db (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmbanan666 authored Nov 26, 2024
1 parent 907b525 commit 184f1f6
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 13 deletions.
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM mcr.microsoft.com/devcontainers/base:dev-ubuntu-24.04
28 changes: 15 additions & 13 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
{
"name": "Chat Game",
"image": "mcr.microsoft.com/devcontainers/typescript-node:22",
"workspaceFolder": "/workspaces/chat-game/${localWorkspaceFolderBasename}",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm i -g [email protected] && pnpm i",

// Configure tool-specific properties.
"dockerComposeFile": "docker-compose.yaml",
"service": "app",
"workspaceFolder": "/workspaces/space/${localWorkspaceFolderBasename}",
"updateContentCommand": "npm i -g turbo@latest && pnpm i",
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"Vue.volar",
"ms-azuretools.vscode-docker",
"Codeium.codeium",
"Vercel.turbo-vsc"
"Vercel.turbo-vsc",
"Prisma.prisma"
]
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "lts",
"pnpmVersion": "latest",
"nvmVersion": "latest"
}
}
}
24 changes: 24 additions & 0 deletions .devcontainer/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile

volumes:
- ../..:/workspaces:cached

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

db:
image: postgres:17
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres

volumes:
postgres-data:

0 comments on commit 184f1f6

Please sign in to comment.