~qeef/damn-deploy

2b746692a01084231a876cb591ebce6d8d4a8e25 — Jiri Vlasak 2 months ago 064fb65
Add panel client v0.1.0
5 files changed, 46 insertions(+), 0 deletions(-)

M .env
M CHANGELOG.md
M README.md
M clients.yml
A panel/Dockerfile
M .env => .env +3 -0
@@ 57,6 57,9 @@ DAMN_CLIENT_VERSION=v0.14.0
MANAGER_SUB=manager
DAMN_MANAGER_REPO=https://gitlab.com/damn-project/damn_jsonmanager
DAMN_MANAGER_VERSION=v0.1.5
PANEL_SUB=panel
DAMN_PANEL_REPO=https://git.sr.ht/~qeef/damn-panel.js
DAMN_PANEL_VERSION=v0.1.0

# Optional chat settings.
#

M CHANGELOG.md => CHANGELOG.md +5 -0
@@ 12,6 12,11 @@ The format is based on [Keep a Changelog][] and this project adheres to
Unreleased
==========

Added
-----

- Panel client.


0.10.2 - 2020-12-01
===================

M README.md => README.md +4 -0
@@ 103,6 103,9 @@ In addition to *Server setup*, you may want to run a client and a manager, too.
    - `MANAGER_SUB`: The subdomain for the manager.
    - `DAMN_MANAGER_REPO`: Link to the manager git repository.
    - `DAMN_MANAGER_VERSION`: Version of the manager.
    - `PANEL_SUB`: The subdomain for the panel client.
    - `DAMN_PANEL_REPO`: Link to panel client git repository.
    - `DAMN_PANEL_VERSION`: Version of the panel client.

2. You may run the damn server with clients now.



@@ 180,6 183,7 @@ How to upgrade
       docker-compose -f server.yml build --no-cache upkeep
       docker-compose -f clients.yml build --no-cache client
       docker-compose -f clients.yml build --no-cache manager
       docker-compose -f clients.yml build --no-cache panel
       docker-compose -f chat.yml build --no-cache chat

6. Start the damn service again:

M clients.yml => clients.yml +15 -0
@@ 34,3 34,18 @@ services:
            - "traefik.http.routers.manager.rule=Host(`${MANAGER_SUB}.${DOMAIN_NAME}`)"
            - "traefik.http.routers.manager.tls=true"
            - "traefik.http.routers.manager.tls.certresolver=le"
    panel:
        build:
            context: panel
            args:
                DAMN_SERVER: ${SERVER_SUB}.${DOMAIN_NAME}
                DAMN_PANEL_REPO: ${DAMN_PANEL_REPO}
                DAMN_PANEL_VERSION: ${DAMN_PANEL_VERSION}
        env_file: .env
        restart: always
        environment:
            - NGINX_HOST=${PANEL_SUB}.${DOMAIN_NAME}
        labels:
            - "traefik.http.routers.panel.rule=Host(`${PANEL_SUB}.${DOMAIN_NAME}`)"
            - "traefik.http.routers.panel.tls=true"
            - "traefik.http.routers.panel.tls.certresolver=le"

A panel/Dockerfile => panel/Dockerfile +19 -0
@@ 0,0 1,19 @@
FROM nginx

ARG DAMN_SERVER
ARG DAMN_PANEL_REPO
ARG DAMN_PANEL_VERSION

RUN apt-get update && apt-get -y install git

RUN rm -rf /usr/share/nginx/html
RUN mkdir /usr/share/nginx/html
RUN git clone \
    --single-branch \
    -b ${DAMN_PANEL_VERSION} \
    ${DAMN_PANEL_REPO} \
    damn_panel
RUN cp -r ./damn_panel/static/* /usr/share/nginx/html/
RUN sed -i \
    -e "s,https://server.damn-project.org,https://${DAMN_SERVER}," /usr/share/nginx/html/panel.html \
    -e "s,https://server.damn-project.org,https://${DAMN_SERVER}," /usr/share/nginx/html/damn-panel.js