build: update just file

This commit is contained in:
Matthieu Bessat 2024-08-02 19:40:14 +02:00
parent b79d989f78
commit c179223649
3 changed files with 4 additions and 4 deletions

View file

@ -16,7 +16,6 @@ COPY --from=builder /usr/src/autotasker/migrations/all.sql /usr/local/src/autota
COPY --from=builder /usr/src/autotasker/init_db.sh /usr/local/bin/autotasker_init_db.sh
COPY --from=builder /usr/src/autotasker/assets /usr/local/lib/autotasker/assets
USER 1000
ENV RUST_LOG=info
ENV RUST_BACKTRACE=1

View file

@ -6,4 +6,5 @@ DEFAULT_MIGRATION_PATH="/usr/local/src/autotasker/migrations/all.sql"
DB_PATH="${DB_PATH:-$DEFAULT_DB_PATH}"
MIGRATION_PATH="${MIGRATION_PATH:-$DEFAULT_MIGRATION_PATH}"
echo "Initializing db at $DB_PATH from schema at $MIGRATION_PATH"
sqlite3 $DB_PATH < $MIGRATION_PATH

View file

@ -2,16 +2,16 @@ export RUST_BACKTRACE := "1"
export RUST_LOG := "trace"
watch-run:
cargo-watch -x 'run -- --config config.yaml --database ./tmp/dbs/autotasker.db'
cargo-watch -x 'run -- --config config.yaml --database ./tmp/dbs/autotasker.db --static-assets ./assets'
run:
cargo run -- --database ./tmp/dbs/autotasker.db --config ./config.yaml --static-assets ./assets
docker-run:
docker run -p 3085:8080 -v ./config:/etc/autotasker -v ./db:/var/lib/autotasker autotasker
docker run -p 3085:8080 -v ./tmp/docker/config:/etc/autotasker -v ./tmp/docker/db:/var/lib/autotasker autotasker
docker-init-db:
docker run -v ./config:/etc/autotasker -v ./db:/var/lib/autotasker autotasker /usr/local/bin/autotasker_init_db.sh
docker run -v ./tmp/docker/config:/etc/autotasker -v ./tmp/docker/db:/var/lib/autotasker autotasker /usr/local/bin/autotasker_init_db.sh
docker-build:
docker build -t autotasker .