add compute server pipeline
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
name: compute
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Write env file
|
||||||
|
run: |
|
||||||
|
test -n "${{ secrets.ENV_COMPUTE }}"
|
||||||
|
umask 077
|
||||||
|
printf '%s\n' "${{ secrets.ENV_COMPUTE }}" > .env.production
|
||||||
|
|
||||||
|
- name: Deploy compute frontend
|
||||||
|
run: docker compose -f docker-compose.compute.yml up -d --build --remove-orphans
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
image: cofee-frontend:compute
|
||||||
|
container_name: cofee_frontend_compute
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
env_file:
|
||||||
|
- .env.production
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
NODE_ENV: production
|
||||||
|
NEXT_TELEMETRY_DISABLED: "1"
|
||||||
|
PORT: 3000
|
||||||
|
HOSTNAME: 0.0.0.0
|
||||||
|
ports:
|
||||||
|
- "80:3000"
|
||||||
Reference in New Issue
Block a user