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

fix: persist subscriber avatars #476

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 4 additions & 2 deletions api/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ export const config: Config = {
},
parameters: {
uploadDir:
(process.env.UPLOAD_DIR && join(process.cwd(), process.env.UPLOAD_DIR)) ??
(process.env.UPLOAD_DIR ? join(process.cwd(), process.env.UPLOAD_DIR)) :
join(process.cwd(), 'uploads'),
avatarDir: process.env.AVATAR_DIR ?? join(process.cwd(), 'avatars'),
avatarDir:
(process.env.AVATAR_DIR ? join(process.cwd(), process.env.AVATAR_DIR)) :
join(process.cwd(), 'avatars'),
storageMode: 'disk',
maxUploadSize: process.env.UPLOAD_MAX_SIZE_IN_BYTES
? Number(process.env.UPLOAD_MAX_SIZE_IN_BYTES)
Expand Down
2 changes: 1 addition & 1 deletion docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ HTTPS_ENABLED=false
SESSION_SECRET=f661ff500fff6b0c8f91310b6fff6b0c
SESSION_NAME=s.id
UPLOAD_DIR=/uploads
AVATAR_DIR=/avatars
UPLOAD_MAX_SIZE_IN_BYTES=2000000
INVITATION_JWT_SECRET=dev_only
INVITATION_EXPIRES_IN=24h
Expand Down Expand Up @@ -71,4 +72,3 @@ APP_REDIS_PORT=9001
REDIS_ENABLED=false
REDIS_HOST=redis
REDIS_PORT=6379

2 changes: 2 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
- app-network
volumes:
- api-data:/app/uploads
- api-avatars-data:/app/avatars
depends_on:
mongo:
condition: service_healthy
Expand Down Expand Up @@ -55,6 +56,7 @@ services:
volumes:
mongo-data:
api-data:
api-avatars-data:

networks:
db-network:
Expand Down
Loading