Compare commits
18 Commits
025c58adac
...
e7d4a18d3e
Author | SHA1 | Date | |
---|---|---|---|
e7d4a18d3e | |||
891a4bced1 | |||
0e45db7f60 | |||
5e62c8982c | |||
1a5548b00e | |||
9483ad3564 | |||
50cfbb6642 | |||
438d254c11 | |||
bfaeba816e | |||
f4af0d5e77 | |||
7bd1c14a27 | |||
8ecb2e073e | |||
83f2785481 | |||
6553dbf3d1 | |||
6ede87f0fd | |||
926e700828 | |||
5b436e226a | |||
66cd8339c3 |
19
.drone.yml
Normal file
19
.drone.yml
Normal file
@ -0,0 +1,19 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: submodules
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: gitea.b4tman.ru
|
||||
username: b4tman
|
||||
repo: b4tman/qchgk
|
||||
tags: latest
|
||||
context: src
|
||||
dockerfile: Dockerfile
|
||||
dry_run: true
|
||||
|
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
||||
[submodule "src"]
|
||||
path = src
|
||||
url = ssh://git@gitea.b4tman.ru:4222/b4tman/qchgk_web.git
|
||||
url = https://gitea.b4tman.ru/b4tman/qchgk_web.git
|
||||
|
19
Dockerfile
19
Dockerfile
@ -1,29 +1,30 @@
|
||||
FROM ekidd/rust-musl-builder:nightly-2019-07-08 as builder
|
||||
FROM rustlang/rust:nightly-alpine as builder
|
||||
|
||||
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL sparse
|
||||
|
||||
RUN apk add --no-cache musl-dev
|
||||
|
||||
WORKDIR /home/rust/src
|
||||
|
||||
COPY Cargo.toml /home/rust/src/
|
||||
COPY Cargo.lock /home/rust/src/
|
||||
RUN mkdir /home/rust/src/src && \
|
||||
echo 'fn main() {}' > /home/rust/src/src/main.rs
|
||||
|
||||
RUN sudo chown -R rust:rust .
|
||||
|
||||
RUN cargo fetch
|
||||
RUN cargo build --release
|
||||
|
||||
RUN rm -f /home/rust/src/src/main.rs
|
||||
COPY src /home/rust/src/src
|
||||
RUN sudo chown -R rust:rust . && \
|
||||
touch /home/rust/src/src/main.rs
|
||||
RUN touch /home/rust/src/src/main.rs
|
||||
|
||||
RUN cargo build --release
|
||||
RUN cargo build -v --release
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY static /static
|
||||
COPY templates /templates
|
||||
COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/qchgk_web /
|
||||
|
||||
VOLUME /db
|
||||
COPY --from=builder /home/rust/src/target/release/qchgk_web /
|
||||
|
||||
EXPOSE 8088/tcp
|
||||
|
||||
|
2
src
2
src
@ -1 +1 @@
|
||||
Subproject commit 665bbaadfb80c2b0fa7679ffea426107873e5894
|
||||
Subproject commit b281f85a70a9a741d1a0851deefcb80e6aa22061
|
Loading…
Reference in New Issue
Block a user