Skip to content

Commit

Permalink
fix docker test
Browse files Browse the repository at this point in the history
  • Loading branch information
younes200 committed Nov 8, 2022
1 parent a9e5bde commit 2a82e5a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .env.ci
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ CELLULOID_PG_IDLE_TIMEOUT=30000
# Cookie secret key. Generate something random and long.
CELLULOID_COOKIE_SECRET=cisecret3

CELLULOID_REDIS_URL=redis://localhost

# email params. Check with your SMTP provider
CELLULOID_SMTP_HOST=
CELLULOID_SMTP_USER=
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerfile-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: "ifconfig -a"
- name: "Start docker server"
run:
docker run --rm -d --init -p 5678:5678 --env-file .env -e NODE_ENV=production -e CELLULOID_PG_HOST=172.17.0.1
docker run --rm -d --init -p 5678:5678 --env-file .env -e NODE_ENV=production -e CELLULOID_PG_HOST=172.17.0.1 -e CELLULOID_PG_HOST=redis://172.17.0.1
--name celluloid-server celluloid-server
- name: "Test docker"
run: node .github/workflows/test-docker.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function main() {
controller.abort();
}, 3000);
try {
response = await fetch("http://localhost:5678", {
response = await fetch("http://localhost:3001", {
signal: controller.signal,
});
} finally {
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/http/SessionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { logger } from "../backends/Logger";
const log = logger("http/Session");

export function createSession() {
let client = createClient({ legacyMode: true });
let client = createClient({ legacyMode: true, url: process.env.CELLULOID_REDIS_URL || "redis://localhost" });
client.connect().catch((e) => log.error(`redis error : ${e.message}`));

log.info("redis connected");
Expand Down
3 changes: 3 additions & 0 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ CELLULOID_PG_PASSWORD=USE_A_STRONGER_PASSWORD
# Postgres connection pool config. Change at your own risk.
CELLULOID_PG_MAX_POOL_SIZE=20
CELLULOID_PG_IDLE_TIMEOUT=30000

# Redis URL
CELLULOID_REDIS_URL=
# Cookie secret key. Generate something random and long.
CELLULOID_COOKIE_SECRET=c7gGEvPZfke5aDN626E13Voo8NmUoxix
# email params. Check with your SMTP provider
Expand Down

0 comments on commit 2a82e5a

Please sign in to comment.