first complex service stack i'm standing up on the laptop

This commit is contained in:
Charles N Wyble 2024-11-26 12:08:37 -06:00
parent 06626ab2fb
commit 37b4021429
2 changed files with 21 additions and 17 deletions

View File

@ -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

View File

@ -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: