fix: remove dependency of docker image
This commit is contained in:
parent
873f912bf8
commit
0612c1adb9
@ -4,10 +4,14 @@ COPY . /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN cargo install diesel_cli --no-default-features --features postgres
|
||||
RUN mkdir -p /out && cp /root/.cargo/bin/diesel /out/
|
||||
RUN cargo build --release
|
||||
|
||||
|
||||
FROM clux/diesel-cli
|
||||
FROM alpine:latest
|
||||
|
||||
COPY --from=builder /out/diesel /bin/
|
||||
|
||||
COPY --from=builder /app/migrations /application/migrations
|
||||
COPY --from=builder /app/Rocket.toml /application/Rocket.toml
|
||||
|
26
docker-compose.yml
Normal file
26
docker-compose.yml
Normal file
@ -0,0 +1,26 @@
|
||||
version: "3"
|
||||
services:
|
||||
rubble:
|
||||
image: kilerd/rubble
|
||||
ports:
|
||||
- "9999:8000"
|
||||
environment:
|
||||
DATABASE_URL: postgres://root:password@postgres/rubble
|
||||
ROCKET_SECRET_KEY: Bqgzqe3zIg2siAS6IBUmL9/50GOW1xDBpxXZgSpFbyM=
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
- backend
|
||||
|
||||
postgres:
|
||||
image: postgres:9-alpine
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: root
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: rubble
|
||||
networks:
|
||||
- backend
|
||||
|
||||
networks:
|
||||
backend:
|
Loading…
Reference in New Issue
Block a user