fix(ci): update references from db/schema.sql to sqlx migrations
CI and Docker builds broke after removing db/ in favor of migrations/. - ci.yml: point psql init at migrations/20260307000000_initial_schema.sql - Dockerfile: COPY migrations instead of db; remove unused db copy in final stage - docker-build.yml: remove db/schema.sql presence check Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,7 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Initialize test database
|
||||
run: psql -h localhost -U postgres -d oxicloud_test -f db/schema.sql
|
||||
run: psql -h localhost -U postgres -d oxicloud_test -f migrations/20260307000000_initial_schema.sql
|
||||
env:
|
||||
PGPASSWORD: postgres
|
||||
|
||||
|
||||
@@ -70,7 +70,4 @@ jobs:
|
||||
echo "=== Static files present ==="
|
||||
docker run --rm --entrypoint sh test/oxicloud:test -c "ls /app/static/index.html && echo 'OK: static files present'"
|
||||
|
||||
echo "=== DB schema present ==="
|
||||
docker run --rm --entrypoint sh test/oxicloud:test -c "ls /app/db/schema.sql && echo 'OK: schema present'"
|
||||
|
||||
echo "✅ Docker build and test completed successfully"
|
||||
|
||||
+1
-3
@@ -24,7 +24,7 @@ COPY --from=cacher /usr/local/cargo/registry /usr/local/cargo/registry
|
||||
COPY Cargo.toml Cargo.lock build.rs ./
|
||||
COPY src src
|
||||
COPY static static
|
||||
COPY db db
|
||||
COPY migrations migrations
|
||||
# Build with all optimizations (DATABASE_URL only needed at compile-time for sqlx)
|
||||
ARG DATABASE_URL="postgres://postgres:postgres@localhost/oxicloud"
|
||||
RUN DATABASE_URL="${DATABASE_URL}" RUSTFLAGS="-C target-cpu=native" cargo build --release
|
||||
@@ -59,8 +59,6 @@ RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
|
||||
# Copy processed static files (bundled/minified by build.rs in release)
|
||||
COPY --from=builder --chown=oxicloud:oxicloud /app/static-dist /app/static
|
||||
COPY --chown=oxicloud:oxicloud db /app/db
|
||||
|
||||
# Create storage directory with proper permissions
|
||||
RUN mkdir -p /app/storage && chown -R oxicloud:oxicloud /app/storage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user