Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46a7cc23bd |
@@ -129,6 +129,14 @@ deploy_version() {
|
||||
registry_login
|
||||
log_info "Pulling ${ANOUMA_IMAGE} …"
|
||||
$COMPOSE pull app || return 1
|
||||
# The media directory is a bind mount. Its host ownership can differ from
|
||||
# the unprivileged `nextjs` user inside the image, which otherwise turns a
|
||||
# valid image upload into Payload's generic FileUploadError. The deploy user
|
||||
# already controls Docker, so use the image's root user only for this narrow
|
||||
# ownership repair before starting the app.
|
||||
log_info "Preparing media storage permissions …"
|
||||
$COMPOSE run --rm --user root --entrypoint /bin/sh app -c \
|
||||
'mkdir -p /app/media && chown -R 1001:1001 /app/media && chmod 775 /app/media' || return 1
|
||||
log_info "Running database migrations …"
|
||||
$COMPOSE run --rm app npm run migrate || return 1
|
||||
log_info "Starting containers …"
|
||||
|
||||
Reference in New Issue
Block a user