diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e3d941f..8b7f0e2f 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 0b347043..1a2cfc30 100755 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -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" diff --git a/Dockerfile b/Dockerfile index 4c899176..4c5b81db 100755 --- a/Dockerfile +++ b/Dockerfile @@ -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