Skip to content

Commit

Permalink
Added Vapor+Swifql+Ikiga
Browse files Browse the repository at this point in the history
  • Loading branch information
Shagit Ziganshin committed Jul 4, 2024
1 parent 8438981 commit efde950
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ARG DEBIAN_FRONTEND=noninteractive
# WARNING: DON'T PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK
# One -q produces output suitable for logging (mostly hides
# progress indicators)
RUN apt-get -yqq update && \
apt-get -yqq install \
RUN apt-get -y update && \
apt-get -y install \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
cloc \
Expand Down
17 changes: 17 additions & 0 deletions frameworks/Swift/vapor/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,23 @@
"display_name": "Vapor",
"notes": "",
"versus": "None"
},
"swifql": {
"plaintext_url": "/plaintext",
"json_url": "/json",
"port": 8080,
"approach": "Realistic",
"classification": "Fullstack",
"framework": "Vapor",
"language": "Swift",
"flavor": "None",
"platform": "None",
"webserver": "None",
"os": "Linux",
"database_os": "Linux",
"display_name": "Vapor",
"notes": "",
"versus": "swift-nio"
}
}]
}
13 changes: 13 additions & 0 deletions frameworks/Swift/vapor/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,16 @@ orm = "Micro"
platform = "None"
webserver = "None"
versus = "None"

[swifql]
urls.plaintext = "/plaintext"
urls.json = "/json"
approach = "Realistic"
classification = "Fullstack"
database = "Postgres"
database_os = "Linux"
os = "Linux"
orm = "Micro"
platform = "None"
webserver = "None"
versus = "None"
1 change: 1 addition & 0 deletions frameworks/Swift/vapor/vapor-swifql-ikiga
Submodule vapor-swifql-ikiga added at 674f96
29 changes: 29 additions & 0 deletions frameworks/Swift/vapor/vapor-swifql.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ================================
# Build image
# ================================
FROM swift:5.10 as build
WORKDIR /build

# Copy entire repo into container
COPY ./vapor-swifql-ikiga .

# Compile with optimizations
RUN swift build \
-c release \
-Xswiftc -enforce-exclusivity=unchecked

# ================================
# Run image
# ================================
FROM swift:5.10-slim
WORKDIR /run

# Copy build artifacts
COPY --from=build /build/.build/release /run

# Copy Swift runtime libraries
COPY --from=build /usr/lib/swift/ /usr/lib/swift/

EXPOSE 8080

ENTRYPOINT ["./app", "serve", "--env", "production", "--hostname", "0.0.0.0", "--port", "8080"]

0 comments on commit efde950

Please sign in to comment.