fix: add data directory with permissions for zine storage
Create /app/data/zines directory in Dockerfile with nextjs user ownership to fix EACCES permission denied error. Add persistent volume mount in docker-compose.yml to preserve zine data across container restarts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
81dfe33135
commit
832d464c7d
|
|
@ -38,6 +38,9 @@ COPY --from=builder /app/public ./public
|
|||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
|
||||
# Create data directory for zine storage with proper permissions
|
||||
RUN mkdir -p /app/data/zines && chown -R nextjs:nodejs /app/data
|
||||
|
||||
USER nextjs
|
||||
|
||||
EXPOSE 3000
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ services:
|
|||
- NODE_ENV=production
|
||||
- HOSTNAME=0.0.0.0
|
||||
- PORT=3000
|
||||
volumes:
|
||||
- zine-data:/app/data
|
||||
networks:
|
||||
- mycofi-network
|
||||
- traefik-public
|
||||
|
|
@ -20,6 +22,10 @@ services:
|
|||
- "traefik.http.services.mycofi.loadbalancer.server.port=3000"
|
||||
- "traefik.docker.network=traefik-public"
|
||||
|
||||
volumes:
|
||||
zine-data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
mycofi-network:
|
||||
driver: bridge
|
||||
|
|
|
|||
Loading…
Reference in New Issue