Skip to content

Commit

Permalink
fix: docker build locally
Browse files Browse the repository at this point in the history
  • Loading branch information
cdaringe committed Mar 24, 2023
1 parent 23053bb commit d45f74f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .rsyncignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ agenda.md
db
docker-compose.dev.yml
esy.lock
img
node_modules/
opam.dev.deps.sh
rad.ts
ui
target
ui
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# FROM --platform=$BUILDPLATFORM rust as base
FROM rust as base
RUN apt-get install libssl-dev openssl
WORKDIR /app

FROM base as chef
RUN cargo install cargo-chef

# FROM --platform=$BUILDPLATFORM chef AS planner
FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
- fresh
init: true
command: |
./agent --db-host=freshdb --awair-endpoint=http://192.168.3.2/air-data/latest --awair-endpoint=http://192.168.3.3/air-data/latest
--db-host=freshdb --awair-endpoint=http://192.168.3.2/air-data/latest --awair-endpoint=http://192.168.3.3/air-data/latest
restart: "on-failure"
logging:
driver: json-file
Expand All @@ -35,7 +35,7 @@ services:
max-file: "10"
build:
context: .
dockerfile: ./Dockerfile.agent
dockerfile: ./Dockerfile
deploy:
restart_policy:
condition: on-failure
Expand Down
1 change: 1 addition & 0 deletions rad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { deploy } from "./.rad/deploy.ts";
import { format } from "./.rad/format.ts";

const build = `docker build -t cdaringe/freshawair .`;
// const build = `docker buildx build --platform linux/amd64 -t cdaringe/freshawair .`;

const startAgent: Task = [
"cargo run -p agent --",
Expand Down

0 comments on commit d45f74f

Please sign in to comment.