add:db migration to dockerbuild and edit origin url
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -54,6 +54,14 @@ RUN npm ci --omit=dev
|
||||
# Copy built app from builder
|
||||
COPY --from=builder /app/build ./build
|
||||
|
||||
# Copy drizzle migrations and config
|
||||
COPY --from=builder /app/drizzle ./drizzle
|
||||
COPY --from=builder /app/drizzle.config.ts ./drizzle.config.ts
|
||||
|
||||
# Copy entrypoint script
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
# Expose port
|
||||
EXPOSE 3000
|
||||
|
||||
@@ -61,5 +69,8 @@ EXPOSE 3000
|
||||
ENV NODE_ENV=production
|
||||
ENV ORIGIN=http://localhost:3000
|
||||
|
||||
# Use entrypoint script
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
||||
# Start the app
|
||||
CMD ["node", "build"]
|
||||
|
||||
Reference in New Issue
Block a user