Skip to content

Commit aea1516

Browse files
committed
first commit 🚀
0 parents  commit aea1516

File tree

1,157 files changed

+109613
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,157 files changed

+109613
-0
lines changed

.do/app.yaml

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
alerts:
2+
- rule: DEPLOYMENT_FAILED
3+
- rule: DOMAIN_FAILED
4+
databases:
5+
- cluster_name: hi-events-redis
6+
engine: REDIS
7+
name: hi-events-redis
8+
production: true
9+
version: "7"
10+
- cluster_name: hi-events-postgres
11+
db_name: hi-events-db
12+
db_user: hi-events-db
13+
engine: PG
14+
name: hi-events-postgres
15+
production: true
16+
version: "12"
17+
domains:
18+
- domain: dev.app.hi.events
19+
type: PRIMARY
20+
- domain: dev.api.hi.events
21+
type: ALIAS
22+
envs:
23+
- key: APP_KEY
24+
scope: RUN_AND_BUILD_TIME
25+
type: SECRET
26+
value: EV[1:tgNynPB6rjrGHux5SLWOaGXa0Dq2wUb9:EkhnCswHYeeErT6Mvx+XPQ2tjyq4C250jc2PCPOkz3c98IeV8s98ncrlucqXN9og5RFoNHD/T0UaZdZo/N5hwf3alA==]
27+
- key: APP_SAAS_MODE_ENABLED
28+
scope: RUN_AND_BUILD_TIME
29+
value: "true"
30+
- key: APP_SAAS_STRIPE_APPLICATION_FEE_PERCENT
31+
scope: RUN_AND_BUILD_TIME
32+
value: "1.5"
33+
- key: APP_FRONTEND_URL
34+
scope: RUN_AND_BUILD_TIME
35+
value: ${APP_URL}
36+
- key: APP_CDN_URL
37+
scope: RUN_AND_BUILD_TIME
38+
value: https://d31hxulcw8spzw.cloudfront.net
39+
- key: FILESYSTEM_DISK
40+
scope: RUN_AND_BUILD_TIME
41+
value: s3-public
42+
- key: JWT_SECRET
43+
scope: RUN_AND_BUILD_TIME
44+
type: SECRET
45+
value: EV[1:JBreFQlA8IdEHquwAg9P58pMz0JEa+KL:4UMIEVR52tj7N1SzSqykHXJNaO9QrCKB1iSa5AOOEHwBoPoiA8WLeplfaaowgliyk/h51NX26+oA0tw7SHL3JrADnw==]
46+
- key: LOG_CHANNEL
47+
scope: RUN_AND_BUILD_TIME
48+
value: stderr
49+
- key: AWS_ACCESS_KEY_ID
50+
scope: RUN_AND_BUILD_TIME
51+
type: SECRET
52+
value: EV[1:nzGNZAsAUDy/A4I57t55AtmGPrdMWVtk:SKvcYl/NT0+IKcu2KaftzbiG3t5nQPfaP/VAj8AE+uzcCWlD]
53+
- key: AWS_SECRET_ACCESS_KEY
54+
scope: RUN_AND_BUILD_TIME
55+
type: SECRET
56+
value: EV[1:vmiq656HFNEtHHJs07EQQeV1HVwjM2ea:h9a00bBytMXPz0sNKHOUOfu5e5EUVeBz1kAcdqRLtYhREmhjr1/oUFQ66fJjMxRuCMCyYpu9kbg=]
57+
- key: AWS_DEFAULT_REGION
58+
scope: RUN_AND_BUILD_TIME
59+
value: us-west-1
60+
- key: AWS_PUBLIC_BUCKET
61+
scope: RUN_AND_BUILD_TIME
62+
value: hievents-public
63+
- key: AWS_PRIVATE_BUCKET
64+
scope: RUN_AND_BUILD_TIME
65+
value: hievents-private
66+
- key: STRIPE_PUBLIC_KEY
67+
scope: RUN_AND_BUILD_TIME
68+
type: SECRET
69+
value: EV[1:XWMOWzHz/fCYVb824fdEDC1dzGM8O7cC:HV/yWPv7eI721IxatBR9alNVIgsyzS1+SOpk3sxdo8kBK2QcRl+seuhB/MTx4dENQRvI083S7Ybe66UrWKAgR5jO4T2xoyEulvJlCeuZksbv0dC0L6rLFX6wJnZCCqhUei6ua02tU71XQqRg5WGO6daLvGbN6xQ5hrbO]
70+
- key: STRIPE_SECRET_KEY
71+
scope: RUN_AND_BUILD_TIME
72+
type: SECRET
73+
value: EV[1:i3ZPSO52CRk6hX2IoC0hox+8yfa8nCNc:NRV6VGMKIGKHlcxw1HTRW25jfNF7tKWuKIF0trHFECPcQ0c7d12BkKlaENi5qi4MxsS3cmbA5wI7lgFwcmEhEz4DOqBBbHjpRgUGF9UXaRvW0PxIixOb9glKW45gPuQGeZn/MJLHNE98p9xi/UyRdgX6wlba96bkauKT]
74+
- key: STRIPE_WEBHOOK_SECRET
75+
scope: RUN_AND_BUILD_TIME
76+
type: SECRET
77+
value: EV[1:R1RgskZKXSKnNsqSCQnPX4VrvJ7GANAW:0yNAzT6WlSBM56ghXUWYtK6Cp0O1WyJZS5RLT17bsqnYrvSCEr2x3mEaR0Go7hSKSODHe1Ql]
78+
- key: MAIL_MAILER
79+
scope: RUN_AND_BUILD_TIME
80+
value: smtp
81+
- key: MAIL_HOST
82+
scope: RUN_AND_BUILD_TIME
83+
value: sandbox.smtp.mailtrap.io
84+
- key: MAIL_PORT
85+
scope: RUN_AND_BUILD_TIME
86+
value: "2525"
87+
- key: MAIL_USERNAME
88+
scope: RUN_AND_BUILD_TIME
89+
type: SECRET
90+
value: EV[1:FVdDTpQf7I1jYF63nPkgQo8dsvRMTKPU:hTCQ3cK6XFZaqp6Fd6jprgRB61oDfwO30p0ii4VL]
91+
- key: MAIL_PASSWORD
92+
scope: RUN_AND_BUILD_TIME
93+
type: SECRET
94+
value: EV[1:kzHCAK6w/8muUxfl9XQ++aCgbbPiq9PK:5Hmdbri+Xz6JVzV9FT0nrrqR+ece7Irq3mm/zdzi]
95+
- key: DB_CONNECTION
96+
scope: RUN_AND_BUILD_TIME
97+
value: pgsql
98+
- key: DB_HOST
99+
scope: RUN_AND_BUILD_TIME
100+
value: ${hi-events-postgres.HOSTNAME}
101+
- key: DB_PORT
102+
scope: RUN_AND_BUILD_TIME
103+
value: ${hi-events-postgres.PORT}
104+
- key: DB_DATABASE
105+
scope: RUN_AND_BUILD_TIME
106+
value: ${hi-events-postgres.DATABASE}
107+
- key: DB_USERNAME
108+
scope: RUN_AND_BUILD_TIME
109+
value: ${hi-events-postgres.USERNAME}
110+
- key: DB_PASSWORD
111+
scope: RUN_AND_BUILD_TIME
112+
value: ${hi-events-postgres.PASSWORD}
113+
- key: REDIS_HOST
114+
scope: RUN_AND_BUILD_TIME
115+
value: ${hi-events-redis.HOSTNAME}
116+
- key: REDIS_PASSWORD
117+
scope: RUN_AND_BUILD_TIME
118+
value: ${hi-events-redis.PASSWORD}
119+
- key: REDIS_USER
120+
scope: RUN_AND_BUILD_TIME
121+
value: ${hi-events-redis.USERNAME}
122+
- key: REDIS_PORT
123+
scope: RUN_AND_BUILD_TIME
124+
value: ${hi-events-redis.PORT}
125+
- key: REDIS_URL
126+
scope: RUN_AND_BUILD_TIME
127+
value: ${hi-events-redis.REDIS_URL}
128+
- key: QUEUE_CONNECTION
129+
scope: RUN_AND_BUILD_TIME
130+
value: redis
131+
- key: DATABASE_URL
132+
scope: RUN_AND_BUILD_TIME
133+
value: ${hi-events-postgres.DATABASE_URL}
134+
features:
135+
- buildpack-stack=ubuntu-22
136+
ingress:
137+
rules:
138+
- component:
139+
name: hi-events-frontend
140+
match:
141+
path:
142+
prefix: /
143+
- component:
144+
name: hi-events-backend
145+
match:
146+
path:
147+
prefix: /api
148+
jobs:
149+
- dockerfile_path: /backend/Dockerfile
150+
github:
151+
branch: main
152+
deploy_on_push: true
153+
repo: HiEventsDev/hi.events
154+
instance_count: 2
155+
instance_size_slug: professional-xs
156+
kind: PRE_DEPLOY
157+
name: hi-events-migration
158+
run_command: php artisan migrate --force
159+
source_dir: backend
160+
name: hi-events-backend-app
161+
region: sfo
162+
services:
163+
- alerts:
164+
- operator: GREATER_THAN
165+
rule: CPU_UTILIZATION
166+
value: 50
167+
window: FIVE_MINUTES
168+
- operator: GREATER_THAN
169+
rule: MEM_UTILIZATION
170+
value: 50
171+
window: FIVE_MINUTES
172+
dockerfile_path: /backend/Dockerfile
173+
github:
174+
branch: main
175+
deploy_on_push: true
176+
repo: HiEventsDev/hi.events
177+
http_port: 80
178+
instance_count: 1
179+
instance_size_slug: professional-xs
180+
name: hi-events-backend
181+
source_dir: backend
182+
static_sites:
183+
- build_command: yarn build
184+
catchall_document: index.html
185+
environment_slug: node-js
186+
envs:
187+
- key: VITE_API_URL
188+
scope: BUILD_TIME
189+
value: ${APP_URL}/api
190+
- key: VITE_STRIPE_PUBLISHABLE_KEY
191+
scope: BUILD_TIME
192+
value: pk_test_51Ofu1CJKnXOyGeQuDPUHiZcJxZozRuERiv4vQRBtCscwTbxOL574cxUjAoNRL2YLCumgC5160pl6kvTIiAc9mOeM0058KAWQ55
193+
github:
194+
branch: main
195+
deploy_on_push: true
196+
repo: HiEventsDev/hi.events
197+
name: hi-events-frontend
198+
source_dir: frontend
199+
workers:
200+
- dockerfile_path: /backend/Dockerfile
201+
github:
202+
branch: main
203+
deploy_on_push: true
204+
repo: HiEventsDev/hi.events
205+
instance_count: 1
206+
instance_size_slug: professional-xs
207+
name: hi-events-worker
208+
run_command: php artisan queue:work
209+
source_dir: backend

.do/deploy.template.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
spec:
2+
name: hi.event
3+
services:
4+
- name: hi.events
5+
dockerfile_path: Dockerfile.all-in-one
6+
git:
7+
repo_clone_url: https://github.com/HiEventsDev/hi.events.git
8+
branch: master
9+
envs:
10+
- key: APP_KEY
11+
scope: RUN_TIME
12+
- key: DATABASE_URL
13+
scope: RUN_TIME
14+
value: ${hievents-db.DATABASE_URL}
15+
databases:
16+
- name: hievents-db

.dockerignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Editor directories and files
2+
**/.vscode/*
3+
!**/.vscode/extensions.json
4+
**/.idea
5+
**/.DS_Store
6+
**/*.suo
7+
**/*.ntvs*
8+
**/*.njsproj
9+
**/*.sln
10+
**/*.sw?
11+
12+
fly.toml
13+
14+
frontend/.env*
15+
backend/.env*

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "\U0001F41B"
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Hi.Events Version and platform**
38+
Please state the version of Hi.Events you are using and what platform it is hosted on. Local, Docker etc.
39+
40+
**Logs**
41+
Add any relevant error logs
42+
43+
**Additional context**
44+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "\U0001F31F"
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Publish Docker image
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
push_to_registry:
9+
name: Push Docker images to Docker Hub
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out the repo
13+
uses: actions/checkout@v4
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
persist-credentials: true
17+
18+
- name: Update VERSION file
19+
run: echo "${{ github.event.release.tag_name }}" > VERSION
20+
21+
- name: Commit VERSION file
22+
run: |
23+
git config --global user.name 'github-actions[bot]'
24+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
25+
git add VERSION
26+
git commit -m "Update VERSION file to ${{ github.event.release.tag_name }}"
27+
git push origin HEAD:main
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Log in to Docker Hub
32+
uses: docker/login-action@v2
33+
with:
34+
username: ${{ secrets.DOCKER_USERNAME }}
35+
password: ${{ secrets.DOCKER_PASSWORD }}
36+
37+
# All-in-one Image Steps
38+
- name: Extract metadata (tags, labels) for All-in-one Docker
39+
id: meta_all_in_one
40+
uses: docker/metadata-action@v3
41+
with:
42+
images: daveearley/hi.events-all-in-one
43+
44+
- name: Build and push All-in-one Docker image
45+
uses: docker/build-push-action@v3
46+
with:
47+
context: ./
48+
file: ./Dockerfile.all-in-one
49+
push: true
50+
tags: ${{ steps.meta_all_in_one.outputs.tags }}
51+
labels: ${{ steps.meta_all_in_one.outputs.labels }}
52+
53+
# Backend Image Steps
54+
- name: Extract metadata (tags, labels) for Backend Docker
55+
id: meta_backend
56+
uses: docker/metadata-action@v3
57+
with:
58+
images: daveearley/hi.events-backend
59+
60+
- name: Build and push Backend Docker image
61+
uses: docker/build-push-action@v3
62+
with:
63+
context: ./backend
64+
file: ./backend/Dockerfile
65+
push: true
66+
tags: ${{ steps.meta_backend.outputs.tags }}
67+
labels: ${{ steps.meta_backend.outputs.labels }}
68+
69+
# Frontend Image Steps
70+
- name: Extract metadata (tags, labels) for Frontend Docker
71+
id: meta_frontend
72+
uses: docker/metadata-action@v3
73+
with:
74+
images: daveearley/hi.events-frontend
75+
76+
- name: Build and push Frontend Docker image
77+
uses: docker/build-push-action@v3
78+
with:
79+
context: ./frontend
80+
file: ./frontend/Dockerfile.ssr
81+
push: true
82+
tags: ${{ steps.meta_frontend.outputs.tags }}
83+
labels: ${{ steps.meta_frontend.outputs.labels }}

0 commit comments

Comments
 (0)