Fixed dockerfile

This commit is contained in:
Thomas
2021-03-29 15:57:58 +02:00
parent 19123fa85a
commit b0ee8e2c23
2 changed files with 12 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ steps:
password: password:
from_secret: reg_password from_secret: reg_password
registry: dockerreg.gltronic.ovh registry: dockerreg.gltronic.ovh
repo: gltron/nexusv7 repo: dockerreg.gltronic.ovh/nexusv7
- name: deploy - name: deploy
image: appleboy/drone-ssh image: appleboy/drone-ssh

View File

@@ -1,16 +1,18 @@
# Build # Build
FROM rust:alpine as generate FROM rust as builder
WORKDIR /usr/src/app WORKDIR app
COPY . . COPY . .
RUN cargo build --release RUN cargo build --release --bin nexus_v7
# Generate # Generate
FROM sratch as generate FROM rust as generate
WORKDIR /usr/src/app WORKDIR app
COPY --from=builder /usr/src/app/target/release/NexusV7 /NexusV7 COPY --from=builder /app/target/release/nexus_v7 nexus_v7
RUN NexusV7 COPY --from=builder /app/templates templates
COPY --from=builder /app/raws raws
RUN ./nexus_v7
# Serve # Serve
FROM nginx as serve FROM nginx as serve
COPY --from=generate /usr/src/app/generated/ /usr/share/nginx/html COPY --from=generate /app/generated/ /usr/share/nginx/html
COPY --from=generate /usr/src/app/resources/ /usr/share/nginx/html COPY --from=builder /app/resources/ /usr/share/nginx/html