This commit is contained in:
parent
8b5e515af1
commit
316a31a8e4
164
.drone.yml
Normal file
164
.drone.yml
Normal file
|
@ -0,0 +1,164 @@
|
|||
kind: pipeline
|
||||
type: docker
|
||||
name: publish-amd64
|
||||
|
||||
platform:
|
||||
arch: amd64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: alpine/git:latest
|
||||
user: root
|
||||
commands:
|
||||
- git clone 'https://gitlab.com/famedly/conduit.git' .
|
||||
- git checkout next
|
||||
- git clone $DRONE_GIT_HTTP_URL meta/
|
||||
- pushd meta
|
||||
- git checkout $DRONE_COMMIT
|
||||
- popd
|
||||
- chown -R 991:991 .
|
||||
|
||||
- name: build
|
||||
image: asonix/rust-builder:amd64-latest
|
||||
pull: always
|
||||
commands:
|
||||
- cargo build --target=$TARGET --release
|
||||
- $TOOL-strip target/$TARGET/release/conduit
|
||||
- cp target/$TARGET/release/conduit .
|
||||
- cp conduit conduit-linux-amd64
|
||||
|
||||
- name: push
|
||||
image: plugins/docker:20
|
||||
settings:
|
||||
username: asonix
|
||||
password:
|
||||
from_secret: dockerhub_token
|
||||
repo: asonix/conduit
|
||||
dockerfile: meta/Dockerfile
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-amd64
|
||||
tags:
|
||||
- latest-linux-arm64v8
|
||||
build_args:
|
||||
- REPO_ARCH=amd64
|
||||
|
||||
- name: publish
|
||||
image: plugins/gitea-release:1
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: gitea_token
|
||||
base_url: https://git.asonix.dog
|
||||
files:
|
||||
- conduit-linux-amd64
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: publish-arm64v8
|
||||
|
||||
platform:
|
||||
arch: amd64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: alpine/git:latest
|
||||
user: root
|
||||
commands:
|
||||
- git clone 'https://gitlab.com/famedly/conduit.git' .
|
||||
- git checkout next
|
||||
- git clone $DRONE_GIT_HTTP_URL meta/
|
||||
- pushd meta
|
||||
- git checkout $DRONE_COMMIT
|
||||
- popd
|
||||
- chown -R 991:991 .
|
||||
|
||||
- name: build
|
||||
image: asonix/rust-builder:arm64v8-latest
|
||||
pull: always
|
||||
commands:
|
||||
- cargo build --target=$TARGET --release
|
||||
- $TOOL-strip target/$TARGET/release/conduit
|
||||
- cp target/$TARGET/release/conduit .
|
||||
- cp conduit conduit-linux-arm64v8
|
||||
|
||||
- name: push
|
||||
image: plugins/docker:20
|
||||
settings:
|
||||
username: asonix
|
||||
password:
|
||||
from_secret: dockerhub_token
|
||||
repo: asonix/conduit
|
||||
dockerfile: meta/Dockerfile
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm64v8
|
||||
tags:
|
||||
- latest-linux-arm64v8
|
||||
build_args:
|
||||
- REPO_ARCH=arm64v8
|
||||
|
||||
- name: publish
|
||||
image: plugins/gitea-release:1
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: gitea_token
|
||||
base_url: https://git.asonix.dog
|
||||
files:
|
||||
- conduit-linux-arm64v8
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: manifest
|
||||
|
||||
platform:
|
||||
arch: amd64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: alpine/git:latest
|
||||
user: root
|
||||
commands:
|
||||
- git clone $DRONE_GIT_HTTP_URL .
|
||||
- git checkout $DRONE_COMMIT
|
||||
- chown -R 991:991 .
|
||||
|
||||
- name: manifest
|
||||
image: plugins/manifest:1
|
||||
settings:
|
||||
username: asonix
|
||||
password:
|
||||
from_secret: dockerhub_token
|
||||
dump: true
|
||||
auto_tag: true
|
||||
tags:
|
||||
- latest
|
||||
ignore_missing: true
|
||||
spec: manifest.tmpl
|
||||
|
||||
|
||||
depends_on:
|
||||
- publish-amd64
|
||||
- publish-arm64v8
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
27
Dockerfile
Normal file
27
Dockerfile
Normal file
|
@ -0,0 +1,27 @@
|
|||
ARG REPO_ARCH=amd64
|
||||
|
||||
# production environment
|
||||
FROM asonix/rust-runner:$REPO_ARCH-latest
|
||||
|
||||
ENV CONDUIT_CONFIG="/opt/app/conduit.toml"
|
||||
|
||||
USER root
|
||||
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libgcc
|
||||
|
||||
COPY conduit /usr/local/bin/conduit
|
||||
|
||||
RUN \
|
||||
chown -R app:app /mnt
|
||||
|
||||
COPY meta/conduit.toml /opt/app/conduit.toml
|
||||
|
||||
VOLUME /mnt
|
||||
USER app
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD /usr/local/bin/conduit
|
23
conduit.toml
Normal file
23
conduit.toml
Normal file
|
@ -0,0 +1,23 @@
|
|||
[global]
|
||||
# This is the only directory where Conduit will save its data
|
||||
database_path = "/mnt/conduit_db"
|
||||
|
||||
# The port Conduit will be running on. You need to set up a reverse proxy in
|
||||
# your web server (e.g. apache or nginx), so all requests to /_matrix on port
|
||||
# 443 and 8448 will be forwarded to the Conduit instance running on this port
|
||||
port = 6167
|
||||
|
||||
# Max size for uploads
|
||||
max_request_size = 40_000_000 # in bytes
|
||||
|
||||
# Enables registration. If set to false, no users can register on this server.
|
||||
allow_registration = true
|
||||
|
||||
# Disable encryption, so no new encrypted rooms can be created
|
||||
# Note: existing rooms will continue to work
|
||||
allow_encryption = true
|
||||
allow_federation = true
|
||||
|
||||
trusted_servers = ["matrix.org"]
|
||||
|
||||
address = "0.0.0.0"
|
19
manifest.tmpl
Normal file
19
manifest.tmpl
Normal file
|
@ -0,0 +1,19 @@
|
|||
image: asonix/conduit:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
manifests:
|
||||
-
|
||||
image: asonix/conduit:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
-
|
||||
image: asonix/conduit:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64v8
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
Loading…
Reference in a new issue