Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
15d2abf
fix(Package): update swift tools version to v6.2, temporal as backend…
vimscientist69 Nov 14, 2025
4152db3
feat(docker-compose.yaml): added temporal services in docker-compose,…
vimscientist69 Nov 18, 2025
68c984a
refactor(ProfilePictureAsyncJob): refactored to temporal activity and…
vimscientist69 Nov 19, 2025
57cb664
refactor: in process of fixing all errors when refactoring queues to …
vimscientist69 Nov 22, 2025
beb7182
fix: fixed all sendable errors
vimscientist69 Nov 22, 2025
4351831
Merge branch 'develop' into william/refactor-queues-to-temporal
vimscientist69 Nov 28, 2025
1f7c8de
fix: in process of debugging why send message temporal workflow doens…
vimscientist69 Nov 24, 2025
b756a7c
fix: fixed temporal workflows not executing
vimscientist69 Nov 25, 2025
c83df3b
fix(DebugMenu,AuthenticationServiceHelper): use new dev-port, run wor…
vimscientist69 Nov 25, 2025
b80b07e
fix(docker-compose): using temporal cli to startup dev-server, as ser…
vimscientist69 Nov 27, 2025
1b7c819
fix(docker-compose): don't use data dir, it's fine to not have a pers…
vimscientist69 Nov 28, 2025
344a010
fix(configure.swift): refactor code, temporal worker command to start…
vimscientist69 Dec 1, 2025
e0ffc9e
feat: deploy temporal service, temporal worker refactor, debug steps …
vimscientist69 Dec 9, 2025
d8ee66e
fix(ApplicationExtensions): use hostname, not static string for instr…
vimscientist69 Dec 11, 2025
391415e
fixup! feat: deploy temporal service, temporal worker refactor, debug…
vimscientist69 Dec 11, 2025
6ddffd0
fix(Dockerfile): use old develop dockerfile
vimscientist69 Dec 11, 2025
f1bf65c
fix(Package.swift): update temporal-swift-sdk, new verions fixes linu…
vimscientist69 Feb 11, 2026
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
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.0
6.2.1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import SwiftUI
/// Used to switch between different API environments
internal enum BaseEnvironmentUrl: String, CaseIterable {
/// Local development environment
case localhost = "http://localhost:8080"
case localhost = "http://localhost:6886"
/// Production environment
case production = "https://api-production.getautoma.app"
/// Sandbox testing environment
Expand Down
2 changes: 1 addition & 1 deletion Backend/DevDockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM swift:6.1.0-jammy AS build
FROM swift:6.2.0-jammy AS build

RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
&& apt-get -q update \
Expand Down
2 changes: 1 addition & 1 deletion Backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ================================
# Build image
# ================================
FROM swift:6.1.0-jammy AS build
FROM swift:6.2.0-jammy AS build

# Install OS updates
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
Expand Down
34 changes: 34 additions & 0 deletions Backend/OldDockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM swift:6.2.0-jammy AS build

RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
&& apt-get -q update \
&& apt-get -q dist-upgrade -y \
&& apt-get -q install -y \
libjemalloc2 \
ca-certificates \
tzdata \
&& apt-get install bash \
&& apt-get install -y openssl libssl-dev libcurl4 libxml2 \
&& rm -r /var/lib/apt/lists/*

WORKDIR /build

RUN --mount=type=secret,id=GITHUB_SSH_AUTHENTICATION_TOKEN \
TOKEN=$(cat /run/secrets/GITHUB_SSH_AUTHENTICATION_TOKEN) && \
git config --global url."https://x-access-token:${TOKEN}@github.com/".insteadOf "https://github.com/"

COPY Package.swift .
COPY Package.resolved .

COPY DataTypes ./DataTypes
RUN --mount=type=cache,target=/build/.build swift package resolve

COPY . .

# Let Docker bind to port 8080
EXPOSE 8080

# Expose PrometheusService server port
EXPOSE 6834

CMD /bin/bash -c "sleep 100000"
97 changes: 97 additions & 0 deletions Backend/OlderDockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# ================================
# Build image
# ================================
FROM swift:6.2.0-jammy AS build

# Install OS updates
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
&& apt-get -q update \
&& apt-get -q dist-upgrade -y \
&& apt-get install -y libjemalloc-dev \
&& apt-get install -y openssl libssl-dev

# Set up a build area
WORKDIR /build

# First just resolve dependencies.
# This creates a cached layer that can be reused
# as long as your Package.swift/Package.resolved
# files do not change.

RUN --mount=type=secret,id=GITHUB_SSH_AUTHENTICATION_TOKEN \
TOKEN=$(cat /run/secrets/GITHUB_SSH_AUTHENTICATION_TOKEN) && \
git config --global url."https://x-access-token:${TOKEN}@github.com/".insteadOf "https://github.com/"

COPY Package.swift .
COPY Package.resolved .

COPY DataTypes ./DataTypes
RUN --mount=type=cache,target=/build/.build swift package resolve
# Copy entire repo into container
COPY . .

# Build everything, with optimizations, with static linking, and using jemalloc
# N.B.: The static version of jemalloc is incompatible with the static Swift runtime.
# RUN --mount=type=cache,target=/build/.build swift build -c release \
RUN --mount=type=cache,target=/build/.build swift build \
--static-swift-stdlib \
-Xlinker -ljemalloc

# Switch to the staging area
WORKDIR /staging

# Copy main executable to staging area
# RUN --mount=type=cache,target=/build/.build cp "$(swift build --package-path /build -c release --show-bin-path)/App" ./
RUN --mount=type=cache,target=/build/.build cp "$(swift build --package-path /build --show-bin-path)/App" ./

# Copy static swift backtracer binary to staging area
RUN cp "/usr/libexec/swift/linux/swift-backtrace-static" ./

# Copy resources bundled by SPM to staging area
# RUN --mount=type=cache,target=/build/.build find -L "$(swift build --package-path /build -c release --show-bin-path)/" -regex '.*\.resources$' -exec cp -Ra {} ./ \;
RUN --mount=type=cache,target=/build/.build find -L "$(swift build --package-path /build --show-bin-path)/" -regex '.*\.resources$' -exec cp -Ra {} ./ \;

# Copy any resources from the public directory and views directory if the directories exist
# Ensure that by default, neither the directory nor any of its contents are writable.
RUN [ -d /build/Public ] && { mv /build/Public ./Public && chmod -R a-w ./Public; } || true
RUN [ -d /build/Resources ] && { mv /build/Resources ./Resources && chmod -R a-w ./Resources; } || true

# ================================
# Run image
# ================================
FROM ubuntu:jammy

# Make sure all system packages are up to date, and install only essential packages.
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
&& apt-get -q update \
&& apt-get -q dist-upgrade -y \
&& apt-get -q install -y \
libjemalloc2 \
ca-certificates \
tzdata \
&& apt-get install bash \
&& apt-get install -y openssl libssl-dev libcurl4 libxml2 \
&& rm -r /var/lib/apt/lists/*

# 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

# Switch to the new home directory
WORKDIR /app

# Copy built executable and any staged resources from builder
COPY --from=build --chown=vapor:vapor /staging /app

# Provide configuration needed by the built-in crash reporter and some sensible default behaviors.
ENV SWIFT_BACKTRACE=enable=yes,sanitize=yes,threads=all,images=all,interactive=no,swift-backtrace=./swift-backtrace-static

# Ensure all further commands run as the vapor user
USER vapor:vapor

# Let Docker bind to port 8080
EXPOSE 8080

# Expose PrometheusService server port
EXPOSE 6834

CMD /bin/bash -c "eval './App $RUN_COMMAND'"
92 changes: 73 additions & 19 deletions Backend/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions Backend/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:6.0
// swift-tools-version:6.2
import PackageDescription

/// Initializes Package
Expand All @@ -24,16 +24,13 @@ public let package = Package(
.package(url: "https://github.com/MacPaw/OpenAI.git", from: "0.4.5"),
.package(url: "https://github.com/soto-project/soto.git", from: "7.3.0"),
.package(url: "https://github.com/swift-server/swift-prometheus.git", from: "2.0.0"),
.package(
url: "https://github.com/m-barthelemy/vapor-queues-fluent-driver.git",
from: "3.0.0-beta1"
),
.package(url: "https://github.com/nmdias/FeedKit.git", from: "10.0.0-rc.3"),
.package(url: "https://github.com/GetAutomaApp/swift-retry.git", branch: "main"),
.package(url: "https://github.com/GetAutomaApp/Fakery", branch: "master"),
.package(url: "https://github.com/GetAutomaApp/AutomaUtilities", branch: "main"),
.package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.11.1"),
.package(url: "https://github.com/lovetodream/swift-log-loki.git", branch: "main"),
.package(url: "https://github.com/apple/swift-temporal-sdk.git", from: "0.6.0")
],
targets: [
.executableTarget(
Expand All @@ -52,13 +49,13 @@ public let package = Package(
.product(name: "SotoS3", package: "soto"),
.product(name: "SotoSNS", package: "soto"),
.product(name: "Prometheus", package: "swift-prometheus"),
.product(name: "QueuesFluentDriver", package: "vapor-queues-fluent-driver"),
.product(name: "SotoTextract", package: "soto"),
.product(name: "FeedKit", package: "FeedKit"),
.product(name: "DMRetry", package: "swift-retry"),
.product(name: "AutomaUtilities", package: "AutomaUtilities"),
"SwiftSoup",
.product(name: "LoggingLoki", package: "swift-log-loki"),
.product(name: "Temporal", package: "swift-temporal-sdk"),
],
exclude: [
"Documentation.md",
Expand Down
7 changes: 7 additions & 0 deletions Backend/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
1. Create `./infra/docker-secrets/` directory with the following files and secrets:
1. "GITHUB_SSH_AUTHENTICATION_TOKEN": A Github fine-grained token that allows cloning AutomaUtilities repository (private)

TODOS:
- [ ] CURRENT BRANCH: deploy temporal and temporal worker on fly.io. Delete vapor-queues worker fly.io config and apps in organizations
- [ ] Fix profile picture image generation not working (current problem: OpenAI platform billing hard limit reached)
- [ ] FUTURE: Fix swift protobuf package warnings (find upstream package, make a pull request to swift protobuf to support latest
swift version - fix warnings) and update upstream package `Package.swift` to use
latest protobuf version.
Loading
Loading