Skip to content

Commit 85b0b9c

Browse files
HyteqHyteq
authored andcommitted
Merge branch 'main' of https://github.com/izadoesdev/mono
2 parents c340ec5 + 5ae6e8e commit 85b0b9c

3 files changed

Lines changed: 39 additions & 4 deletions

File tree

dashboard.Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,22 @@ RUN bun run build
3131
FROM oven/bun:1-slim
3232

3333
# Copy built files from builder
34-
COPY --from=builder /build/apps/dashboard /app
3534
WORKDIR /app
3635

36+
COPY --from=builder /build/node_modules ./node_modules
37+
COPY --from=builder /build/apps/dashboard ./apps/dashboard
38+
COPY --from=builder /build/packages ./packages
39+
3740
# Set environment variables
3841
ENV NODE_ENV=production
3942
ENV REDIS_URL=redis://localhost
4043
ENV DATABASE_URL=postgres://localhost
4144
ENV CLICKHOUSE_URL=https://localhost
4245
ENV NEXT_PUBLIC_API_URL=https://localhost
43-
46+
ENV HOSTNAME=0.0.0.0
4447
# Expose port
4548
EXPOSE 3000
49+
50+
WORKDIR /app/apps/dashboard
4651
# Start API
4752
CMD ["bun", "run", "start"]

infrastructure/deploy/deploy-databuddy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
vars:
88
working_dir_name: "databuddy-app"
99
version: "{{version | default('latest')}}"
10-
api_host: beta-api.databyddy.cc
10+
api_host: beta-api.databuddy.cc
1111
basket_host: beta-basket.databuddy.cc
1212
dashboard_host: beta-app.databuddy.cc
1313

infrastructure/deploy/docker-compose.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ x-databuddy-env:
55
REDIS_URL: "redis://redis:6379"
66
QUEUE_REDIS_URL: "redis://redis:6379"
77
AI_API_KEY: "{{ai_api_key}}" # secret
8-
BETTER_AUTH_SECRET: "{{better_auth_secret | regex_replace('\\$', '\\$\\$')}}" # secret
8+
BETTER_AUTH_SECRET: "{{better_auth_secret | regex_replace('\\$', '$$')}}" # secret
99
BETTER_AUTH_URL: "{{better_auth_url}}"
1010
GITHUB_CLIENT_ID: "{{github_client_id}}"
1111
GITHUB_CLIENT_SECRET: "{{github_client_secret}}" # secret
@@ -24,6 +24,14 @@ services:
2424
environment: *databuddy-env
2525
deploy:
2626
mode: global
27+
update_config:
28+
parallelism: 1
29+
order: stop-first
30+
failure_action: rollback
31+
delay: 60s
32+
rollback_config:
33+
parallelism: 1
34+
order: stop-first
2735
placement:
2836
constraints:
2937
- node.labels.app==true
@@ -36,12 +44,22 @@ services:
3644
networks:
3745
- databuddy_ingress
3846
- databuddy_aqua
47+
expose:
48+
- 3000
3949

4050
dashboard:
4151
image: "registry.databuddy.cc/dashboard:{{version}}"
4252
environment: *databuddy-env
4353
deploy:
4454
mode: global
55+
update_config:
56+
parallelism: 1
57+
order: stop-first
58+
failure_action: rollback
59+
delay: 60s
60+
rollback_config:
61+
parallelism: 1
62+
order: stop-first
4563
placement:
4664
constraints:
4765
- node.labels.app==true
@@ -54,12 +72,22 @@ services:
5472
networks:
5573
- databuddy_ingress
5674
- databuddy_aqua
75+
expose:
76+
- 3000
5777

5878
basket:
5979
image: "registry.databuddy.cc/basket:{{version}}"
6080
environment: *databuddy-env
6181
deploy:
6282
mode: global
83+
update_config:
84+
parallelism: 1
85+
order: stop-first
86+
failure_action: rollback
87+
delay: 60s
88+
rollback_config:
89+
parallelism: 1
90+
order: stop-first
6391
placement:
6492
constraints:
6593
- node.labels.app==true
@@ -72,6 +100,8 @@ services:
72100
networks:
73101
- databuddy_ingress
74102
- databuddy_aqua
103+
expose:
104+
- 3000
75105

76106
networks:
77107
databuddy_ingress:

0 commit comments

Comments
 (0)