feat: working on docker build
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
# Build the executable
|
||||
FROM swift as build
|
||||
FROM swift:5.10 AS build
|
||||
WORKDIR /build
|
||||
COPY ./Package.* ./
|
||||
RUN swift package resolve
|
||||
@@ -8,6 +8,6 @@ COPY . .
|
||||
RUN swift build --enable-test-discovery -c release -Xswiftc -g
|
||||
|
||||
# Run image
|
||||
FROM swift
|
||||
FROM swift:5.10
|
||||
WORKDIR /run
|
||||
COPY --from=build /build/.build/release /run
|
||||
|
||||
8
Makefile
8
Makefile
@@ -14,11 +14,11 @@ run:
|
||||
@swift run dewPoint-controller
|
||||
|
||||
start-mosquitto:
|
||||
@docker compose start mosquitto
|
||||
@docker-compose start mosquitto
|
||||
|
||||
stop-mosquitto:
|
||||
@docker compose rm -f mosquitto || true
|
||||
@docker-compose rm -f mosquitto || true
|
||||
|
||||
test-docker:
|
||||
@docker compose run -i test
|
||||
@docker compose kill mosquitto-test
|
||||
@docker-compose run -i test
|
||||
@docker-compose kill mosquitto-test
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// swift-tools-version:5.5
|
||||
// swift-tools-version:5.10
|
||||
|
||||
import PackageDescription
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ import NIOTransportServices
|
||||
import EnvVars
|
||||
|
||||
public class AsyncClient {
|
||||
public static let eventLoopGroup = NIOTSEventLoopGroup()
|
||||
//public static let eventLoopGroup = NIOTSEventLoopGroup()
|
||||
public static let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
|
||||
public let client: MQTTClient
|
||||
public private(set) var shuttingDown: Bool
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# run this with docker-compose -f docker/docker-compose.yml run test
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
test:
|
||||
image: swift:latest
|
||||
|
||||
Reference in New Issue
Block a user