mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 14:16:19 +00:00
Compare commits
6 commits
e64b993069
...
80a02da0e4
Author | SHA1 | Date | |
---|---|---|---|
80a02da0e4 | |||
b28bccaa80 | |||
fb7c7c4c0a | |||
1a907bc8d0 | |||
157d5ee2f0 | |||
860ecc60cd |
5 changed files with 9 additions and 13 deletions
|
@ -1,3 +1,6 @@
|
||||||
.env
|
.env
|
||||||
target
|
target
|
||||||
*.Dockerfile
|
*.Dockerfile
|
||||||
|
*.db
|
||||||
|
../*.db
|
||||||
|
test-db
|
|
@ -37,10 +37,6 @@ tracing = "0.1"
|
||||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||||
axum = "0.7.5"
|
axum = "0.7.5"
|
||||||
|
|
||||||
#[dependencies.rocket_db_pools]
|
|
||||||
#version = "0.2.0"
|
|
||||||
#features = ["sqlx_sqlite"]
|
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "api"
|
name = "api"
|
||||||
path = "src/api/main.rs"
|
path = "src/api/main.rs"
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[default.databases.precios]
|
|
||||||
url = "../sqlite.db"
|
|
||||||
|
|
|
@ -3,14 +3,14 @@ WORKDIR /usr/src/app
|
||||||
RUN apk add --no-cache libgcc
|
RUN apk add --no-cache libgcc
|
||||||
|
|
||||||
FROM docker.io/rust:1 AS rs-build
|
FROM docker.io/rust:1 AS rs-build
|
||||||
# RUN apt-get update && apt-get install -y openssl-dev libsqlite3-dev && rm -rf /var/lib/apt/lists/*
|
# RUN apt-get update && apt-get install -y libsqlite3-dev sqlite3 && rm -rf /var/lib/apt/lists/*
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN --mount=type=cache,sharing=locked,target=/root/.cargo/git \
|
RUN --mount=type=cache,sharing=locked,target=/root/.cargo/git \
|
||||||
--mount=type=cache,sharing=locked,target=/root/.cargo/registry \
|
--mount=type=cache,sharing=locked,target=/root/.cargo/registry \
|
||||||
--mount=type=cache,sharing=locked,target=/usr/src/app/target \
|
--mount=type=cache,sharing=locked,target=/usr/src/app/target \
|
||||||
cargo install --bin api --locked --path .
|
SQLX_OFFLINE=true cargo install --bin api --locked --path .
|
||||||
|
|
||||||
FROM base
|
FROM base
|
||||||
RUN apk add --no-cache sqlite sqlite-libs tini
|
RUN apk add --no-cache sqlite sqlite-libs tini
|
||||||
|
|
|
@ -2,15 +2,15 @@ FROM cgr.dev/chainguard/wolfi-base AS base
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
RUN apk add --no-cache libgcc
|
RUN apk add --no-cache libgcc
|
||||||
|
|
||||||
FROM docker.io/rust:1.76 as rs-build
|
FROM docker.io/rust:1 as rs-build
|
||||||
# RUN apt-get update && apt-get install -y libsqlite3-dev && rm -rf /var/lib/apt/lists/*
|
# RUN apt-get update && apt-get install -y libsqlite3-dev sqlite3 && rm -rf /var/lib/apt/lists/*
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN --mount=type=cache,sharing=locked,target=/root/.cargo/git \
|
RUN --mount=type=cache,sharing=locked,target=/root/.cargo/git \
|
||||||
--mount=type=cache,sharing=locked,target=/root/.cargo/registry \
|
--mount=type=cache,sharing=locked,target=/root/.cargo/registry \
|
||||||
--mount=type=cache,sharing=locked,target=/usr/src/app/target \
|
--mount=type=cache,sharing=locked,target=/usr/src/app/target \
|
||||||
cargo install --bin scraper --locked --path .
|
SQLX_OFFLINE=true cargo install --bin scraper --locked --path .
|
||||||
|
|
||||||
FROM base
|
FROM base
|
||||||
RUN apk add --no-cache sqlite sqlite-libs
|
RUN apk add --no-cache sqlite sqlite-libs
|
||||||
|
|
Loading…
Reference in a new issue