Docker: seed veritabanları + entrypoint (yokatlas.db imaja gömülür, açılışta volume'e kopyalanır)
All checks were successful
Deploy / deploy (push) Successful in 1m52s
All checks were successful
Deploy / deploy (push) Successful in 1m52s
- .dockerignore: data/ içindeki sqlite dosyalarına build context izni - runner imajına data/ -> /app/seed kopyalanır - entrypoint: yokatlas.db her açılışta tazelenir, app.db sadece ilk kurulumda tohumlanır Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -37,8 +37,14 @@ COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
# Seed veritabanları: entrypoint açılışta bunları /app/data volume'üne kopyalar
|
||||
COPY data/ ./seed/
|
||||
COPY scripts/docker-entrypoint.sh ./docker-entrypoint.sh
|
||||
|
||||
# SQLite veri dizini
|
||||
RUN mkdir -p /app/data && chown -R nextjs:nodejs /app/data
|
||||
RUN chmod +x /app/docker-entrypoint.sh && \
|
||||
mkdir -p /app/data && \
|
||||
chown -R nextjs:nodejs /app/data /app/seed
|
||||
|
||||
USER nextjs
|
||||
|
||||
@@ -46,4 +52,4 @@ EXPOSE 3000
|
||||
ENV PORT=3000
|
||||
ENV HOSTNAME="0.0.0.0"
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["/app/docker-entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user