Skip to content

Commit 5a76445

Browse files
committed
update
Signed-off-by: nιcнolaѕ wιlde <ncwilde43@gmail.com>
1 parent 7bad852 commit 5a76445

File tree

4 files changed

+194
-0
lines changed

4 files changed

+194
-0
lines changed

docker/reactive-resume/.env.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONTAINER_NAME=reactive-resume

docker/reactive-resume/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# reactive-resume
2+
3+
See documentation located [here][1].
4+
5+
[1]: <https://nicholaswilde.io/homelab/apps/reactive-resume/>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
version: '3'
3+
4+
dotenv:
5+
- .env
6+
7+
tasks:
8+
export:
9+
desc: Export the task list
10+
cmds:
11+
- task --list > task-list.txt
12+
watch:
13+
desc: Watch Docker container logs
14+
cmds:
15+
- docker compose logs -f
16+
pull:
17+
desc: Pull docker images
18+
cmds:
19+
- docker compose pull
20+
status:
21+
desc: Docker container status
22+
cmds:
23+
- docker container ps
24+
init:
25+
desc: Init .env file
26+
cmds:
27+
- cp .env.tmpl .env
28+
decrypt:
29+
desc: Decrypt .env using SOPS
30+
cmds:
31+
- sops -d --input-type dotenv --output-type dotenv .env.enc > .env
32+
encrypt:
33+
desc: Encrypt .env using SOPS
34+
cmds:
35+
- sops -e .env > .env.enc
36+
update:
37+
desc: Update running containers
38+
cmds:
39+
- docker compose up --force-recreate --build -d
40+
- docker image prune -a -f
41+
up:
42+
desc: Run Docker compose in the foreground.
43+
cmds:
44+
- docker compose up
45+
up-d:
46+
desc: Run Docker compose in the background.
47+
cmds:
48+
- docker compose up -d --remove-orphans
49+
restart:
50+
desc: Restart Docker containers
51+
cmds:
52+
- docker compose restart
53+
upgrade:
54+
desc: Upgrade Docker containers
55+
cmds:
56+
- git pull origin
57+
- task: update
58+
stop:
59+
desc: Stop Docker containers
60+
cmds:
61+
- docker compose stop
62+
default:
63+
cmds:
64+
- task -l
65+
silent: true
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
# In this Docker Compose example, it assumes that you maintain a reverse proxy externally (or chose not to).
3+
# The only two exposed ports here are from minio (:9000) and the app itself (:3000).
4+
# If these ports are changed, ensure that the env vars passed to the app are also changed accordingly.
5+
6+
services:
7+
# Database (Postgres)
8+
postgres:
9+
image: postgres:16-alpine
10+
restart: unless-stopped
11+
volumes:
12+
- postgres_data:/var/lib/postgresql/data
13+
environment:
14+
POSTGRES_DB: postgres
15+
POSTGRES_USER: postgres
16+
POSTGRES_PASSWORD: postgres
17+
healthcheck:
18+
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
19+
interval: 10s
20+
timeout: 5s
21+
retries: 5
22+
23+
# Storage (for image uploads)
24+
minio:
25+
image: minio/minio:latest
26+
restart: unless-stopped
27+
command: server /data
28+
ports:
29+
- "9000:9000"
30+
volumes:
31+
- minio_data:/data
32+
environment:
33+
MINIO_ROOT_USER: minioadmin
34+
MINIO_ROOT_PASSWORD: minioadmin
35+
36+
# Chrome Browser (for printing and previews)
37+
chrome:
38+
image: ghcr.io/browserless/chromium:v2.18.0 # Upgrading to newer versions causes issues
39+
restart: unless-stopped
40+
extra_hosts:
41+
- "host.docker.internal:host-gateway"
42+
environment:
43+
TIMEOUT: 10000
44+
CONCURRENT: 10
45+
TOKEN: chrome_token
46+
EXIT_ON_HEALTH_FAILURE: "true"
47+
PRE_REQUEST_HEALTH_CHECK: "true"
48+
49+
app:
50+
image: amruthpillai/reactive-resume:latest
51+
restart: unless-stopped
52+
ports:
53+
- "3000:3000"
54+
depends_on:
55+
- postgres
56+
- minio
57+
- chrome
58+
environment:
59+
# -- Environment Variables --
60+
PORT: 3000
61+
NODE_ENV: production
62+
63+
# -- URLs --
64+
PUBLIC_URL: http://192.168.2.147:3000
65+
STORAGE_URL: http://192.168.2.147:9000/default
66+
67+
# -- Printer (Chrome) --
68+
CHROME_TOKEN: chrome_token
69+
CHROME_URL: ws://chrome:3000
70+
71+
# -- Database (Postgres) --
72+
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres
73+
74+
# -- Auth --
75+
ACCESS_TOKEN_SECRET: access_token_secret
76+
REFRESH_TOKEN_SECRET: refresh_token_secret
77+
78+
# -- Emails --
79+
MAIL_FROM: noreply@localhost
80+
# SMTP_URL: smtp://user:pass@smtp:587 # Optional
81+
82+
# -- Storage (Minio) --
83+
STORAGE_ENDPOINT: minio
84+
STORAGE_PORT: 9000
85+
STORAGE_REGION: us-east-1 # Optional
86+
STORAGE_BUCKET: default
87+
STORAGE_ACCESS_KEY: minioadmin
88+
STORAGE_SECRET_KEY: minioadmin
89+
STORAGE_USE_SSL: "false"
90+
STORAGE_SKIP_BUCKET_CHECK: "false"
91+
92+
# -- Crowdin (Optional) --
93+
# CROWDIN_PROJECT_ID:
94+
# CROWDIN_PERSONAL_TOKEN:
95+
96+
# -- Email (Optional) --
97+
# DISABLE_SIGNUPS: "false"
98+
# DISABLE_EMAIL_AUTH: "false"
99+
100+
# -- GitHub (Optional) --
101+
# GITHUB_CLIENT_ID: github_client_id
102+
# GITHUB_CLIENT_SECRET: github_client_secret
103+
# GITHUB_CALLBACK_URL: http://localhost:3000/api/auth/github/callback
104+
105+
# -- Google (Optional) --
106+
# GOOGLE_CLIENT_ID: google_client_id
107+
# GOOGLE_CLIENT_SECRET: google_client_secret
108+
# GOOGLE_CALLBACK_URL: http://localhost:3000/api/auth/google/callback
109+
110+
# -- OpenID (Optional) --
111+
# VITE_OPENID_NAME: OpenID
112+
# OPENID_AUTHORIZATION_URL:
113+
# OPENID_CALLBACK_URL: http://localhost:3000/api/auth/openid/callback
114+
# OPENID_CLIENT_ID:
115+
# OPENID_CLIENT_SECRET:
116+
# OPENID_ISSUER:
117+
# OPENID_SCOPE: openid profile email
118+
# OPENID_TOKEN_URL:
119+
# OPENID_USER_INFO_URL:
120+
121+
volumes:
122+
minio_data:
123+
postgres_data:

0 commit comments

Comments
 (0)