Browse Source

make app docker volume friendly

devel
Rohan Sircar 1 year ago
parent
commit
81a72578a1
  1. 2
      .env
  2. 3
      .gitignore
  3. BIN
      app.db
  4. 2
      build.Dockerfile
  5. 2
      ci.Dockerfile

2
.env

@ -1,3 +1,3 @@
DATABASE_URL=app.db
DATABASE_URL=data/app.db
BIND_ADDRESS=127.0.0.1:7800
HASH_COST=8

3
.gitignore

@ -1,4 +1,5 @@
/target
.idea
.vscode
/app_db.db
app.db
/data

BIN
app.db

2
build.Dockerfile

@ -33,7 +33,7 @@ RUN groupadd $APP_USER \
COPY ./.env ${APP}/.env
COPY ./migrations ${APP}/migrations
COPY ./static ${APP}/static
COPY ./db/empty.db ${APP}/app.db
COPY ./db/empty.db ${APP}/data/app.db
COPY --from=builder /actix-demo/target/release/actix-demo ${APP}/actix-demo
RUN chown -R $APP_USER:$APP_USER ${APP}

2
ci.Dockerfile

@ -17,7 +17,7 @@ RUN groupadd $APP_USER \
COPY ./.env ${APP}/.env
COPY ./migrations ${APP}/migrations
COPY ./static ${APP}/static
COPY ./db/empty.db ${APP}/app.db
COPY ./db/empty.db ${APP}/data/app.db
COPY ./target/release/actix-demo ${APP}/actix-demo
RUN chown -R $APP_USER:$APP_USER ${APP}

Loading…
Cancel
Save