add entrypoint for db migration push

This commit is contained in:
2026-02-17 18:52:31 +13:00
parent 6813f41d56
commit e1a33f234a
3 changed files with 11 additions and 2 deletions

1
.gitignore vendored
View File

@@ -17,6 +17,7 @@ Thumbs.db
.env.* .env.*
!.env.example !.env.example
!.env.test !.env.test
pgdata
# Vite # Vite
vite.config.js.timestamp-* vite.config.js.timestamp-*

View File

@@ -35,8 +35,15 @@ RUN pnpm install --frozen-lockfile --prod
# Copy built application from builder # Copy built application from builder
COPY --from=builder /app/build ./build COPY --from=builder /app/build ./build
# Install netcat for health checks
RUN apk add --no-cache netcat-openbsd
# Copy entrypoint script
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Expose port (SvelteKit Node adapter default) # Expose port (SvelteKit Node adapter default)
EXPOSE 5173 EXPOSE 3000
# Start the application # Start the application
CMD ["node", "build"] ENTRYPOINT ["/app/entrypoint.sh"]

View File

@@ -9,6 +9,7 @@ services:
POSTGRES_PASSWORD: mysecretpassword POSTGRES_PASSWORD: mysecretpassword
POSTGRES_DB: memento POSTGRES_DB: memento
volumes: volumes:
# - ~/tmp/pgdata:/var/lib/postgresql
- ./pgdata:/var/lib/postgresql - ./pgdata:/var/lib/postgresql
app: app: