Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand All @@ -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"]
2 changes: 1 addition & 1 deletion Dockerfile.development
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)),
Expand Down
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -33,4 +31,4 @@ services:
ports:
- '8080:8080'
user: '0'
command: ["serve", "--env", "production", "--hostname", "0.0.0.0", "--port", "8080"]
command: ["serve", "--env", "production", "--hostname", "0.0.0.0", "--port", "8080"]
Loading