CI script

This commit is contained in:
gltron
2022-04-17 18:38:34 +02:00
parent d04ac22128
commit 87aa08ff86
2 changed files with 29 additions and 14 deletions

27
.drone.yml Normal file
View File

@@ -0,0 +1,27 @@
kind: pipeline
type: docker
name: default
steps:
- name: build
image: plugins/docker
settings:
username:
from_secret: reg_user
password:
from_secret: reg_password
registry: dockerreg.gltronic.ovh
repo: dockerreg.gltronic.ovh/impact
- name: deploy
image: appleboy/drone-ssh
settings:
host:
from_secret: deploy_host
username:
from_secret: deploy_user
password:
from_secret: deploy_password
port: 22
script:
- cd docker/perso
- docker-compose pull impact
- docker-compose up -d impact

View File

@@ -1,14 +1,2 @@
# Build FROM nginx as serve
FROM rust as builder COPY ./src/ /usr/share/nginx/html
WORKDIR /app
COPY . .
WORKDIR /app/server
RUN cargo build --release --bin out_of_quiz
# Runner
FROM debian:bullseye-slim as runner
COPY --from=builder /app/server/target/release/out_of_quiz /app/out_of_quiz
COPY --from=builder /app/server/quotes.json /app/quotes.json
COPY --from=builder /app/client /app/static
WORKDIR app
CMD ["./out_of_quiz"]