fix docker upload directory permissions
This commit is contained in:
parent
b3a93a0011
commit
a5803cba6e
3 changed files with 7 additions and 4 deletions
|
@ -25,4 +25,7 @@ COPY --from=strip-dev-deps /app ./
|
||||||
COPY --from=frontend-compiler /app/frontend/public ./frontend/public
|
COPY --from=frontend-compiler /app/frontend/public ./frontend/public
|
||||||
RUN echo "JWT_SECRET=$(openssl rand -base64 256 | tr -d '\n')" > .env
|
RUN echo "JWT_SECRET=$(openssl rand -base64 256 | tr -d '\n')" > .env
|
||||||
USER node
|
USER node
|
||||||
|
USER root
|
||||||
|
RUN mkdir /var/lib/waffle/uploads && chown -R node /var/lib/waffle/uploads
|
||||||
|
USER node
|
||||||
CMD [ "/bin/sh", "-c", "node index.js" ]
|
CMD [ "/bin/sh", "-c", "node index.js" ]
|
||||||
|
|
|
@ -11,7 +11,7 @@ services:
|
||||||
waffle:
|
waffle:
|
||||||
build: .
|
build: .
|
||||||
volumes:
|
volumes:
|
||||||
- ./tmp/uploads:/var/lib/waffle/uploads
|
- ./tmp/uploads:/var/lib/waffle
|
||||||
ports:
|
ports:
|
||||||
- "5002:3000"
|
- "5002:3000"
|
||||||
environment:
|
environment:
|
||||||
|
@ -19,7 +19,7 @@ services:
|
||||||
- PGHOST=waffle-postgres
|
- PGHOST=waffle-postgres
|
||||||
- PGPASSWORD=supersecretpassword11
|
- PGPASSWORD=supersecretpassword11
|
||||||
- PGDATABASE=waffle
|
- PGDATABASE=waffle
|
||||||
- AVATAR_UPLOADS_DIR=/var/lib/waffle/uploads
|
- AVATAR_UPLOADS_DIR=/var/lib/waffle/uploads/avatar
|
||||||
- ATTACHMENT_UPLOADS_DIR=/var/lib/waffle/uploads
|
- ATTACHMENT_UPLOADS_DIR=/var/lib/waffle/uploads/attachment
|
||||||
depends_on:
|
depends_on:
|
||||||
- waffle-postgres
|
- waffle-postgres
|
||||||
|
|
|
@ -232,7 +232,7 @@ export class GatewayClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPresenceEntry(status: GatewayPresenceStatus): GatewayPresenceEntry | null {
|
getPresenceEntry(status: GatewayPresenceStatus): GatewayPresenceEntry | null {
|
||||||
if (!this.user || !this.ready) {
|
if (!this.user) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue