From 37b4021429178e5f91ebb70f3d01b0d8dee25bb5 Mon Sep 17 00:00:00 2001 From: ReachableCEO Date: Tue, 26 Nov 2024 12:08:37 -0600 Subject: [PATCH] first complex service stack i'm standing up on the laptop --- README.md | 1 + .../reactive-resume/docker-compose.yml | 37 ++++++++++--------- 2 files changed, 21 insertions(+), 17 deletions(-) rename {upstream => webapps}/reactive-resume/docker-compose.yml (76%) diff --git a/README.md b/README.md index ef836a3..c4d5497 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ This repo is for containers running on Charles (@ReachableCEO) laptop | tube-archivist | 1004 | | dashboard | 1005 | | vscode-server | 1006 | +| reactive-resume | 1007 | ## Secrets diff --git a/upstream/reactive-resume/docker-compose.yml b/webapps/reactive-resume/docker-compose.yml similarity index 76% rename from upstream/reactive-resume/docker-compose.yml rename to webapps/reactive-resume/docker-compose.yml index d30f3bc..ca55f69 100644 --- a/upstream/reactive-resume/docker-compose.yml +++ b/webapps/reactive-resume/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3.8" # In this Docker Compose example, it assumes that you maintain a reverse proxy externally (or chose not to). # The only two exposed ports here are from minio (:9000) and the app itself (:3000). @@ -6,11 +5,12 @@ version: "3.8" services: # Database (Postgres) - postgres: + reactiveresume-postgres: image: postgres:16-alpine + container_name: tsys-reactiveresume-postgres restart: unless-stopped volumes: - - postgres_data:/var/lib/postgresql/data + - tsys-reactiveresume-postgres_data:/var/lib/postgresql/data environment: POSTGRES_DB: postgres POSTGRES_USER: postgres @@ -22,21 +22,23 @@ services: retries: 5 # Storage (for image uploads) - minio: + reactiveresume-minio: image: minio/minio + container_name: tsys-reactivereusme-minio restart: unless-stopped command: server /data ports: - "9000:9000" volumes: - - minio_data:/data + - tsys-reactiveresume-minio_data:/data environment: MINIO_ROOT_USER: minioadmin MINIO_ROOT_PASSWORD: minioadmin # Chrome Browser (for printing and previews) - chrome: + reactiveresume-chrome: image: ghcr.io/browserless/chromium:latest + container_name: tsys-reactiveresume-chrome restart: unless-stopped environment: TIMEOUT: 10000 @@ -45,30 +47,31 @@ services: EXIT_ON_HEALTH_FAILURE: true PRE_REQUEST_HEALTH_CHECK: true - app: + reactiveresume-app: image: amruthpillai/reactive-resume:latest + container_name: tsys-reactiveresume-app restart: unless-stopped ports: - - "3000:3000" + - "1007:3000" depends_on: - - postgres - - minio - - chrome + - reactiveresume-postgres + - reactiveresume-minio + - reactiveresume-chrome environment: # -- Environment Variables -- PORT: 3000 NODE_ENV: production # -- URLs -- - PUBLIC_URL: http://localhost:3000 + PUBLIC_URL: http://localhost:1007 STORAGE_URL: http://localhost:9000/default # -- Printer (Chrome) -- CHROME_TOKEN: chrome_token - CHROME_URL: ws://chrome:3000 + CHROME_URL: ws://tsys-reactiveresume-chrome:3000 # -- Database (Postgres) -- - DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres + DATABASE_URL: postgresql://postgres:postgres@tsys-reactiveresume-postgres:5432/postgres # -- Auth -- ACCESS_TOKEN_SECRET: access_token_secret @@ -79,7 +82,7 @@ services: # SMTP_URL: smtp://user:pass@smtp:587 # Optional # -- Storage (Minio) -- - STORAGE_ENDPOINT: minio + STORAGE_ENDPOINT: tsys-reactiveresume-minio STORAGE_PORT: 9000 STORAGE_REGION: us-east-1 # Optional STORAGE_BUCKET: default @@ -107,5 +110,5 @@ services: # GOOGLE_CALLBACK_URL: http://localhost:3000/api/auth/google/callback volumes: - minio_data: - postgres_data: + tsys-reactiveresume-minio_data: + tsys-reactiveresume-postgres_data: \ No newline at end of file