fix: create symlink for Strapi admin build location
Strapi 5 looks for the admin build at /app/node_modules/@strapi/admin/dist/server/server/build but we have it at /app/dist/build. Create a symlink to fix this.
This commit is contained in:
parent
ff0916b37c
commit
80a2ee89a6
@ -38,6 +38,11 @@ COPY --from=builder --chown=nodejs:nodejs /app/.strapi ./.strapi
|
||||
COPY --from=builder --chown=nodejs:nodejs /app/node_modules ./node_modules
|
||||
COPY --from=builder --chown=nodejs:nodejs /app/package*.json ./
|
||||
|
||||
# Create the directory structure Strapi expects for the admin build
|
||||
RUN mkdir -p /app/node_modules/@strapi/admin/dist/server/server && \
|
||||
ln -sf /app/dist/build /app/node_modules/@strapi/admin/dist/server/server/build && \
|
||||
chown -R nodejs:nodejs /app/node_modules/@strapi/admin
|
||||
|
||||
# Create data and database directories with proper permissions
|
||||
RUN mkdir -p /app/.tmp /app/database /app/uploads /app/database/migrations && \
|
||||
chown -R nodejs:nodejs /app
|
||||
|
||||
Loading…
Reference in New Issue
Block a user