Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add devContainer #40

Merged
merged 9 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Node.js",
"dockerComposeFile": ["docker-compose.yml"],
"service": "mediator",
"remoteUser": "node",
"workspaceFolder": "/work",
"containerEnv": {
"COREPACK_ENABLE_STRICT": "1"
},
"postCreateCommand": "sudo chown node node_modules && sudo sudo corepack enable && yes | corepack prepare pnpm --activate && yes | pnpm install --frozen-lockfile",
"features": {
"ghcr.io/jckimble/devcontainer-features/ngrok:3": {}
},
"customizations": {
"vscode": {
"extensions": ["github.copilot", "github.copilot-chat", "ms-azuretools.vscode-docker"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The copilot and copilot-chat seem more personal than related this project?

}
}
}
34 changes: 34 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: '3.9'

networks:
local_network:
jleach marked this conversation as resolved.
Show resolved Hide resolved
name: local_network
volumes:
postgres-data:


services:
postgres:
image: postgres:13
env_file:
- ../.env
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- local_network

mediator:
image: mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye
working_dir: /work
volumes:
- ../:/work
- /work/node_modules
ports:
- '3110:3110'
tty: true
networks:
- local_network
env_file:
- ../.env
environment:
- POSTGRES_HOST=postgres
21 changes: 14 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
POSTGRES_USER=
POSTGRES_PASSWORD=
POSTGRES_HOST=
POSTGRES_ADMIN_USER=
POSTGRES_ADMIN_PASSWORD=
# Agent
AGENT_ENDPOINTS='https://example.ca,wss://example.ca'
USE_PUSH_NOTIFICATIONS='false'
NOTIFICATION_WEBHOOK_URL=

# Database
POSTGRES_USER=postgres
POSTGRES_PASSWORD=85a52c9283b0
POSTGRES_ADMIN_USER=postgres
POSTGRES_ADMIN_PASSWORD=85a52c9283b0

# Wallet
WALLET_KEY=a67d8724cb01c7c0b5d92f01fb052885
WALLET_NAME=mediator-dev # Will be database name.

USE_PUSH_NOTIFICATIONS='true'
NOTIFICATION_WEBHOOK_URL=
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ build
node_modules
.env
.env.local
.pnpm-store/
.pnpm-store/
*.orig