diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..c8d09bd --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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": ["ms-azuretools.vscode-docker"] + } + } +} diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000..64d15df --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,34 @@ +version: "3.9" + +networks: + local_credo_mediator_network: + name: local_credo_mediator_network +volumes: + postgres-data: + + +services: + postgres: + image: postgres:13 + env_file: + - ../.env + volumes: + - postgres-data:/var/lib/postgresql/data + networks: + - local_credo_mediator_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_credo_mediator_network + env_file: + - ../.env + environment: + - POSTGRES_HOST=postgres diff --git a/.env.example b/.env.example index b2196f7..591735f 100644 --- a/.env.example +++ b/.env.example @@ -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= \ No newline at end of file diff --git a/.gitignore b/.gitignore index e4aac6a..cfafea5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ build node_modules .env .env.local -.pnpm-store/ \ No newline at end of file +.pnpm-store/ +*.orig