diff --git a/Dockerfile b/Dockerfile index 8064687..12247c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # ================================ # Build image # ================================ -FROM swift:5.7.1-jammy as build +FROM swift:6.1-noble as build WORKDIR /build # First just resolve dependencies. @@ -20,7 +20,7 @@ RUN swift build --enable-test-discovery -c release # ================================ # Run image # ================================ -FROM swift:5.7.1-jammy-slim +FROM swift:6.1-noble-slim # Create a vapor user and group with /app as its home directory RUN useradd --user-group --create-home --system --skel /dev/null --home-dir /app vapor @@ -37,6 +37,6 @@ COPY --from=build --chown=vapor:vapor /build/Public /app/Public # Ensure all further commands run as the vapor user USER vapor:vapor -# Start the Vapor service when the image is run, default to listening on 8080 in production environment +# Start the Vapor service when the image is run, default to listening on 8080 in production environment ENTRYPOINT ["./app"] CMD ["serve", "--env", "production", "--hostname", "0.0.0.0", "--port", "8080"] diff --git a/Dockerfile.development b/Dockerfile.development index 06ace05..b1d3571 100644 --- a/Dockerfile.development +++ b/Dockerfile.development @@ -1,7 +1,7 @@ # ================================ # Build image # ================================ -FROM swift:5.7.1-jammy as build +FROM swift:6.1-noble as build EXPOSE 8080 USER root diff --git a/Package.swift b/Package.swift index 76446cd..48b60e9 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:6.1 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -9,15 +9,15 @@ let package = Package( .macOS(.v10_15) ], dependencies: [ - .package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"), - .package(name: "SwiftProtobuf", url: "https://github.com/apple/swift-protobuf.git", from: "1.6.0"), + .package(url: "https://github.com/vapor/vapor.git", from: "4.115.0"), + .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.29.0"), ], targets: [ .target( name: "App", dependencies: [ .product(name: "Vapor", package: "vapor"), - "SwiftProtobuf" + .product(name: "SwiftProtobuf", package: "swift-protobuf") ], swiftSettings: [ .unsafeFlags(["-cross-module-optimization"], .when(configuration: .release)), diff --git a/docker-compose.yml b/docker-compose.yml index d61a726..e313548 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,8 +13,6 @@ # Run commands: docker-compose run open-meteo --help # Stop all: docker-compose down (add -v to wipe data) # -version: '3.7' - volumes: db_data: @@ -33,4 +31,4 @@ services: ports: - '8080:8080' user: '0' - command: ["serve", "--env", "production", "--hostname", "0.0.0.0", "--port", "8080"] \ No newline at end of file + command: ["serve", "--env", "production", "--hostname", "0.0.0.0", "--port", "8080"]