1 Commits

Author SHA1 Message Date
d41f63f60b actix ver 2019-08-20 16:33:03 +03:00
5 changed files with 12 additions and 69 deletions

View File

@@ -1,56 +0,0 @@
kind: pipeline
type: docker
name: default
platform:
os: linux
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: gitea.b4tman.ru/b4tman/qchgk
tags: latest
context: src
dockerfile: Dockerfile
dry_run: true
---
kind: pipeline
type: docker
name: publish
platform:
os: linux
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: gitea.b4tman.ru/b4tman/qchgk
auto_tag: true
context: src
dockerfile: Dockerfile
password:
from_secret: gitea_password
trigger:
branch:
- master
- rocket
- actix
event:
- push
- tag

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "src"] [submodule "src"]
path = src path = src
url = https://gitea.b4tman.ru/b4tman/qchgk_web.git url = ssh://git@gitea.b4tman.ru:4222/b4tman/qchgk_web.git

View File

@@ -1,30 +1,29 @@
FROM rustlang/rust:nightly-alpine as builder FROM ekidd/rust-musl-builder:1.36.0 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.toml /home/rust/src/
COPY Cargo.lock /home/rust/src/ COPY Cargo.lock /home/rust/src/
RUN mkdir /home/rust/src/src && \ RUN mkdir /home/rust/src/src && \
echo 'fn main() {}' > /home/rust/src/src/main.rs echo 'fn main() {}' > /home/rust/src/src/main.rs
RUN sudo chown -R rust:rust .
RUN cargo fetch RUN cargo fetch
RUN cargo build --release RUN cargo build --release
RUN rm -f /home/rust/src/src/main.rs RUN rm -f /home/rust/src/src/main.rs
COPY src /home/rust/src/src COPY src /home/rust/src/src
RUN touch /home/rust/src/src/main.rs RUN sudo chown -R rust:rust . && \
touch /home/rust/src/src/main.rs
RUN cargo build -v --release RUN cargo build --release
FROM scratch FROM scratch
COPY static /static COPY static /static
COPY templates /templates COPY templates /templates
COPY --from=builder /home/rust/src/target/release/qchgk_web / COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/qchgk_web /
VOLUME /db
EXPOSE 8088/tcp EXPOSE 8088/tcp

View File

@@ -4,7 +4,7 @@ services:
build: build:
context: src context: src
dockerfile: ../Dockerfile dockerfile: ../Dockerfile
image: 'b4tman/qchgk:rocket' image: 'b4tman/qchgk:actix'
container_name: 'qchgk' container_name: 'qchgk'
ports: ports:
- '8088:8088' - '8088:8088'

2
src

Submodule src updated: b281f85a70...aec2e87472