Skip to content

Add one-command Linux run script with self-contained Redis and open CORS#4

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/create-docker-redis-server
Draft

Add one-command Linux run script with self-contained Redis and open CORS#4
Copilot wants to merge 4 commits intomainfrom
copilot/create-docker-redis-server

Conversation

Copy link

Copilot AI commented Mar 17, 2026

No Linux-friendly way existed to spin up the server in one command — Redis had to be provisioned separately, and Socket.io CORS always enforced a fixed clienturl regardless of devMode.

Changes

run.sh (new)

Single executable entry point for Linux VMs. Detects Docker Compose v2 plugin or v1 standalone and runs docker compose up --build.

./run.sh

docker-compose.yml (new)

  • redis service: redis:alpine with a redis-cli ping health-check; server waits on service_healthy
  • server service: builds from existing dockerfile, exposes :5000, injects env vars:
    • host=redis — service-name DNS resolution
    • devMode=true — enables open CORS on both HTTP and WebSocket layers

server/libs/websockets.ts (modified)

devMode was already respected by the HTTP middleware in apiServer.ts but ignored by the Socket.io server, which always used origin: [clienturl]. Now both layers share the same behaviour:

const allowAllOrigins = devMode === 'true';

export const io = new Server({
  cors: {
    origin: allowAllOrigins ? '*' : [clienturl],
    credentials: !allowAllOrigins,  // wildcards require credentials:false
  },
});

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

…allow-all-origins

Co-authored-by: itsfuad <49100463+itsfuad@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Docker command to run self-contained Redis server Add one-command Linux run script with self-contained Redis and open CORS Mar 17, 2026
Copilot AI requested a review from itsfuad March 17, 2026 18:48
@itsfuad
Copy link
Member

itsfuad commented Mar 17, 2026

@copilot could not run properly,

server-1 | Connecting to Redis
server-1 | error: Uncaught (in promise) Error: -ERR AUTH called without any password configured for the default user. Are you sure your configuration is correct?
server-1 | throw new ErrorReplyError(decoder.decode(line));
server-1 | ^
server-1 | at tryParseErrorReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:120:11)
server-1 | at tryReadErrorReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:130:3)
server-1 | at eventLoopTick (ext:core/01_core.js:175:7)
server-1 | at async readReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:24:5)
server-1 | at async RedisConnection.processCommandQueue (https://deno.land/x/redis@v0.32.1/connection.ts:259:21)
server-1 exited with code 1 (restarting)
server-1 | Connecting to Redis
server-1 | error: Uncaught (in promise) Error: -ERR AUTH called without any password configured for the default user. Are you sure your configuration is correct?
server-1 | throw new ErrorReplyError(decoder.decode(line));
server-1 | ^
server-1 | at tryParseErrorReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:120:11)
server-1 | at tryReadErrorReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:130:3)
server-1 | at eventLoopTick (ext:core/01_core.js:175:7)
server-1 | at async readReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:24:5)
server-1 | at async RedisConnection.processCommandQueue (https://deno.land/x/redis@v0.32.1/connection.ts:259:21)
server-1 exited with code 1 (restarting)
server-1 | Connecting to Redis
server-1 | error: Uncaught (in promise) Error: -ERR AUTH called without any password configured for the default user. Are you sure your configuration is correct?
server-1 | throw new ErrorReplyError(decoder.decode(line));
server-1 | ^
server-1 | at tryParseErrorReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:120:11)
server-1 | at tryReadErrorReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:130:3)
server-1 | at eventLoopTick (ext:core/01_core.js:175:7)
server-1 | at async readReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:24:5)
server-1 | at async RedisConnection.processCommandQueue (https://deno.land/x/redis@v0.32.1/connection.ts:259:21)
server-1 exited with code 1 (restarting)
server-1 | Connecting to Redis
server-1 | error: Uncaught (in promise) Error: -ERR AUTH called without any password configured for the default user. Are you sure your configuration is correct?
server-1 | throw new ErrorReplyError(decoder.decode(line));
server-1 | ^
server-1 | at tryParseErrorReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:120:11)
server-1 | at tryReadErrorReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:130:3)
server-1 | at eventLoopTick (ext:core/01_core.js:175:7)
server-1 | at async readReply (https://deno.land/x/redis@v0.32.1/protocol/deno_streams/reply.ts:24:5)
server-1 | at async RedisConnection.processCommandQueue (https://deno.land/x/redis@v0.32.1/connection.ts:259:21)
server-1 exited with code 1 (restarting)

Copy link
Author

Copilot AI commented Mar 17, 2026

@itsfuad The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: d587e44a-62b7-400f-aacc-e26bc22d29a9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants