Skip to content

Commit

Permalink
fix: caddy server version
Browse files Browse the repository at this point in the history
  • Loading branch information
thutasann committed Dec 7, 2024
1 parent 03ece0f commit 8e0c38b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
10 changes: 10 additions & 0 deletions websocket-upstash/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
## Build chat Application That Scales Horizontally with WebSockets and Upstash Redis

## Scripts

```bash
chmod +x run.sh
```

```bash
./run.sh
```
9 changes: 5 additions & 4 deletions websocket-upstash/server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,18 @@ services:
- PORT=5000
- CORS_ORIGIN=${CORS_ORIGIN}
- UPSTASH_REDIS_REST_URL=${UPSTASH_REDIS_REST_URL}

caddy:
image: caddy/caddy:2.7.3-alpine
image: caddy/caddy:latest
container_name: caddy-server
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- $PWD/site:/srv
- ./Caddyfile:/etc/caddy/Caddyfile
- ./site:/srv
- caddy_data:/data
- caddy_config:/config

Expand Down
4 changes: 4 additions & 0 deletions websocket-upstash/server/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docker compose down
export UPSTASH_REDIS_REST_URL=rediss://default:AWgOAAIjcDE5NWUwYjA1MTViMDQ0YTYyOGJiZmI1YzBmODg1ZDEzZnAxMA@golden-moose-26638.upstash.io:6379
export CORS_ORIGIN=http://localhost:3000
docker compose up -d --build

0 comments on commit 8e0c38b

Please sign in to comment.