diff --git a/README.md b/README.md index 8eed36a..9d7e3b8 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ - + diff --git a/docker-compose.production.yml b/docker-compose.production.yml index ddb30d3..0c75a64 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -1,11 +1,6 @@ services: - asciinema: + whisper: build: - context: ./docker/asciinema/ + context: ./docker/whisper/ dockerfile: Dockerfile.production - image: git.nixc.us/nixius/asciinema:production-asciinema - postgres: - build: - context: ./docker/postgres/ - dockerfile: Dockerfile.production - image: git.nixc.us/nixius/asciinema:production-postgres \ No newline at end of file + image: git.nixc.us/nixius/whisper:production \ No newline at end of file diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml index 6e6728a..97beb9d 100644 --- a/docker-compose.staging.yml +++ b/docker-compose.staging.yml @@ -1,11 +1,6 @@ services: - asciinema: + whisper: build: - context: ./docker/asciinema/ + context: ./docker/whisper/ dockerfile: Dockerfile - image: git.nixc.us/nixius/asciinema:staging-asciinema - postgres: - build: - context: ./docker/postgres/ - dockerfile: Dockerfile - image: git.nixc.us/nixius/asciinema:staging-postgres \ No newline at end of file + image: git.nixc.us/nixius/whisper:staging diff --git a/docker/asciinema/Dockerfile b/docker/asciinema/Dockerfile deleted file mode 100644 index 9fe4d54..0000000 --- a/docker/asciinema/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM ghcr.io/asciinema/asciinema-server:20240428 \ No newline at end of file diff --git a/docker/asciinema/Dockerfile.production b/docker/asciinema/Dockerfile.production deleted file mode 100644 index e7625a5..0000000 --- a/docker/asciinema/Dockerfile.production +++ /dev/null @@ -1 +0,0 @@ -FROM git.nixc.us/nixius/asciinema:staging-asciinema \ No newline at end of file diff --git a/docker/postgres/Dockerfile b/docker/postgres/Dockerfile deleted file mode 100644 index 10ed255..0000000 --- a/docker/postgres/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM docker.io/library/postgres:14-alpine \ No newline at end of file diff --git a/docker/postgres/Dockerfile.production b/docker/postgres/Dockerfile.production deleted file mode 100644 index 9f0b809..0000000 --- a/docker/postgres/Dockerfile.production +++ /dev/null @@ -1 +0,0 @@ -FROM git.nixc.us/nixius/asciinema:staging-postgres \ No newline at end of file diff --git a/docker/whisper/Dockerfile b/docker/whisper/Dockerfile new file mode 100644 index 0000000..c23e8e9 --- /dev/null +++ b/docker/whisper/Dockerfile @@ -0,0 +1,18 @@ +# Use an official Node runtime as a parent image +FROM node:16-alpine + +# Set the working directory +WORKDIR /usr/src/app + +# Clone the repo +RUN apk --no-cache add git \ + && git clone https://github.com/xenova/whisper-web.git . + +# Install dependencies +RUN npm install + +# Expose the port the app runs on +EXPOSE 5173 + +# Command to run the app +CMD ["npm", "run", "dev"] diff --git a/docker/whisper/Dockerfile.production b/docker/whisper/Dockerfile.production new file mode 100644 index 0000000..5892f6e --- /dev/null +++ b/docker/whisper/Dockerfile.production @@ -0,0 +1 @@ +FROM git.nixc.us/nixius/whisper:staging \ No newline at end of file diff --git a/stack.production.yml b/stack.production.yml index 86b3a1e..14543c3 100644 --- a/stack.production.yml +++ b/stack.production.yml @@ -4,76 +4,35 @@ networks: default: driver: overlay services: - asciinema: - image: git.nixc.us/nixius/asciinema:production-asciinema + whisper: + image: git.nixc.us/nixius/whisper:production-whisper networks: - traefik - default # ports: # - '80:4000' environment: - SECRET_KEY_BASE: "MSDkdc9ZI5ar3VC3eOhRp3xWxiIQkEi3LR1UYNtU7NUAJeERhMVSvb0E4b5ODyCW" - URL_HOST: "asciinema.nixc.us" - # URL_PORT: "443" - URL_SCHEME: "https" - SMTP_HOST: "box.p.nixc.us" - # SMTP_PORT: "465" - SMTP_USERNAME: "asciinema@nixc.us" - SMTP_FROM_ADDRESS: "asciinema@nixc.us" - SMTP_REPLY_TO_ADDRESS: "asciinema@nixc.us" - # SMTP_AUTH: always - # SMTP_TLS: always - SMTP_PASSWORD: "DiHcwSup8RSo66LgEzGi7R4PBWsDyFgxn" - UNCLAIMED_RECORDING_TTL: "30" SIGN_UP_DISABLED: "true" - volumes: - - /mnt/tank/persist/nixc.us/asciinema/production/data:/var/opt/asciinema + # volumes: + # - /mnt/tank/persist/nixc.us/whisper/production/data:/var/opt/whisper deploy: placement: constraints: - node.hostname == macmini14 labels: homepage.group: apps - homepage.name: asciinema - homepage.href: https://asciinema.nixc.us/ - homepage.description: asciinema + homepage.name: whisper + homepage.href: https://whisper.nixc.us/ + homepage.description: whisper traefik.enable: "true" - traefik.http.routers.production-asciinema_asciinema.rule: "Host(`asciinema.nixc.us`)" - traefik.http.routers.production-asciinema_asciinema.entrypoints: "websecure" - traefik.http.routers.production-asciinema_asciinema.tls: "true" - traefik.http.routers.production-asciinema_asciinema.tls.certresolver: "letsencryptresolver" - traefik.http.routers.production-asciinema_asciinema.service: "production-asciinema_asciinema" - traefik.http.services.production-asciinema_asciinema.loadbalancer.server.port: "4000" + traefik.http.routers.production-whisper_whisper.rule: "Host(`whisper.nixc.us`)" + traefik.http.routers.production-whisper_whisper.entrypoints: "websecure" + traefik.http.routers.production-whisper_whisper.tls: "true" + traefik.http.routers.production-whisper_whisper.tls.certresolver: "letsencryptresolver" + traefik.http.routers.production-whisper_whisper.service: "production-whisper_whisper" + traefik.http.services.production-whisper_whisper.loadbalancer.server.port: "5173" traefik.docker.network: "traefik" - # traefik.http.routers.production_asciinema.middlewares: 'authelia_authelia@docker' - update_config: - order: stop-first - failure_action: rollback - delay: 5s - delay: 10s - parallelism: 1 - restart_policy: - condition: on-failure - - postgres: - image: git.nixc.us/nixius/asciinema:production-postgres - networks: - - default - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - volumes: - - /mnt/tank/persist/nixc.us/asciinema/production/db:/var/lib/postgresql/data - healthcheck: - test: ['CMD-SHELL', 'pg_isready -U postgres'] - interval: 2s - timeout: 5s - retries: 10 - deploy: - placement: - constraints: - - node.hostname == macmini14 - labels: - traefik.enable: "false" + traefik.http.routers.production_whisper.middlewares: 'authelia_authelia@docker' update_config: order: stop-first failure_action: rollback diff --git a/stack.staging.yml b/stack.staging.yml index 615fe1f..b012523 100644 --- a/stack.staging.yml +++ b/stack.staging.yml @@ -1,55 +1,6 @@ services: - asciinema: - image: git.nixc.us/nixius/asciinema:staging-asciinema - # ports: - # - '80:4000' - environment: - - SECRET_KEY_BASE=MSDkdc9ZI5ar3VC3eOhRp3xWxiIQkEi3LR1UYNtU7NUAJeERhMVSvb0E4b5ODyCW - - URL_HOST=asciinema.nixc.us - - URL_PORT=443 - - SMTP_HOST=box.p.nixc.us - - SMTP_USERNAME=asciinema@nixc.us - - SMTP_PASSWORD=DiHcwSup8RSo66LgEzGi7R4PBWsDyFgxn - # volumes: - # - /mnt/tank/persist/nixc.us/asciinema/staging/data:/var/opt/asciinema - deploy: - placement: - constraints: - - node.hostname == macmini14 - labels: - # homepage.group: apps - # homepage.name: asciinema - # homepage.href: https://staging.asciinema.nixc.us/ - # homepage.description: asciinema - traefik.enable: "false" - # traefik.http.routers.asciinema.tls: "true" - # traefik.http.services.staging_asciinema.loadbalancer.server.port: 8080 - # traefik.http.routers.staging_asciinema.rule: Host(`asciinema.nixc.us`) - # traefik.http.routers.staging_asciinema.entrypoints: websecure - # traefik.http.routers.staging_asciinema.tls.certresolver: letsencryptresolver - # traefik.http.routers.staging_asciinema.service: staging_asciinema - # traefik.docker.network: traefik - # # traefik.http.routers.staging_asciinema.middlewares: 'authelia_authelia@docker' - update_config: - order: stop-first - failure_action: rollback - delay: 5s - delay: 10s - parallelism: 1 - restart_policy: - condition: on-failure - - postgres: - image: git.nixc.us/nixius/asciinema:staging-postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - # volumes: - # - /mnt/tank/persist/nixc.us/asciinema/staging/db:/var/lib/postgresql/data - healthcheck: - test: ['CMD-SHELL', 'pg_isready -U postgres'] - interval: 2s - timeout: 5s - retries: 10 + whisper: + image: git.nixc.us/nixius/asciinema:staging deploy: placement: constraints: