Skip to content

Commit ed65345

Browse files
committed
Merge branch 'main' into 'fix-region-deletion'.
2 parents a51acf9 + eaf8fc8 commit ed65345

File tree

1,356 files changed

+60910
-41698
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,356 files changed

+60910
-41698
lines changed

.eslintignore

Lines changed: 0 additions & 10 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,41 @@ jobs:
117117
"PUBLIC_CONSOLE_MODE=self-hosted"
118118
"PUBLIC_APPWRITE_MULTI_REGION=false"
119119
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
120+
121+
publish-cloud-no-regions:
122+
runs-on: ubuntu-latest
123+
steps:
124+
- name: Checkout the repo
125+
uses: actions/checkout@v2
126+
- name: Set up QEMU
127+
uses: docker/setup-qemu-action@v2
128+
- name: Set up Docker Buildx
129+
uses: docker/setup-buildx-action@v2
130+
- name: Log in to Docker Hub
131+
uses: docker/login-action@v3
132+
with:
133+
username: ${{ vars.DOCKERHUB_USERNAME }}
134+
password: ${{ secrets.DOCKERHUB_TOKEN }}
135+
- name: Extract metadata (tags, labels) for Docker
136+
id: meta
137+
uses: docker/metadata-action@v5
138+
with:
139+
images: appwrite/console-cloud-no-regions
140+
tags: |
141+
type=semver,pattern={{major}}.{{minor}}.{{patch}}
142+
type=semver,pattern={{major}}.{{minor}}
143+
type=semver,pattern={{major}}
144+
- name: Build and push Docker image
145+
id: push
146+
uses: docker/build-push-action@v6
147+
with:
148+
context: .
149+
push: true
150+
platforms: linux/amd64,linux/arm64
151+
tags: ${{ steps.meta.outputs.tags }}
152+
labels: ${{ steps.meta.outputs.labels }}
153+
build-args: |
154+
"PUBLIC_CONSOLE_MODE=cloud"
155+
"PUBLIC_APPWRITE_MULTI_REGION=false"
156+
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}"
157+
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ dist/
2424
*.swp
2525
### Node ###
2626
# Logs
27-
logs
2827
*.log
2928
npm-debug.log*
3029
yarn-debug.log*

CONTRIBUTING.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ pnpm run lint
108108

109109
Diagnostic tool that checks for the following:
110110

111-
- Unused CSS
112-
- Svelte A11y hints
113-
- TypeScript compiler errors
111+
- Unused CSS
112+
- Svelte A11y hints
113+
- TypeScript compiler errors
114114

115115
```bash
116116
pnpm run check
@@ -130,11 +130,11 @@ doc-548-submit-a-pull-request-section-to-contribution-guide
130130

131131
When `TYPE` can be:
132132

133-
- **feat** - is a new feature
134-
- **doc** - documentation only changes
135-
- **cicd** - changes related to CI/CD system
136-
- **fix** - a bug fix
137-
- **refactor** - code change that neither fixes a bug nor adds a feature
133+
- **feat** - is a new feature
134+
- **doc** - documentation only changes
135+
- **cicd** - changes related to CI/CD system
136+
- **fix** - a bug fix
137+
- **refactor** - code change that neither fixes a bug nor adds a feature
138138

139139
**All PRs must include a commit message with a description of the changes made!**
140140

@@ -175,22 +175,22 @@ $ git push origin [name_of_your_new_branch]
175175

176176
Before committing always make sure to run all available tools to improve the codebase:
177177

178-
- Formatter
179-
- `pnpm run format`
180-
- Tests
181-
- `pnpm test`
182-
- Diagnostics
183-
- `pnpm run check`
178+
- Formatter
179+
- `pnpm run format`
180+
- Tests
181+
- `pnpm test`
182+
- Diagnostics
183+
- `pnpm run check`
184184

185185
### Performance
186186

187187
Page load times are a key consideration for users of all browsers and device types.
188188

189189
There are some general things we can do in front-end development:
190190

191-
- Minimize HTTP requests
192-
- Minimize blocking – content should be readable before client-side processing
193-
- Lazy load "supplementary" content, especially images
191+
- Minimize HTTP requests
192+
- Minimize blocking – content should be readable before client-side processing
193+
- Lazy load "supplementary" content, especially images
194194

195195
### Don't Repeat Yourself (DRY)
196196

@@ -202,12 +202,12 @@ If you stick to this principle, you will ensure that you will only ever need to
202202

203203
Separate _structure_ from _presentation_ from _behavior_ to aid maintainability and understanding.
204204

205-
- Keep CSS (presentation), JS (behavior) and HTML (structure) in the same respective Svelte component
206-
- Avoid writing inline CSS or Javascript in HTML
207-
- Avoid writing CSS or HTML in Javascript
208-
- Don't choose HTML elements to imply style
209-
- Where appropriate, use CSS or Svelte rather than Javascript for animations and transitions
210-
- Try to use templates when defining markup in Javascript
205+
- Keep CSS (presentation), JS (behavior) and HTML (structure) in the same respective Svelte component
206+
- Avoid writing inline CSS or Javascript in HTML
207+
- Avoid writing CSS or HTML in Javascript
208+
- Don't choose HTML elements to imply style
209+
- Where appropriate, use CSS or Svelte rather than Javascript for animations and transitions
210+
- Try to use templates when defining markup in Javascript
211211

212212
### Write code to be read
213213

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
3737
ENV SENTRY_RELEASE=$SENTRY_RELEASE
3838
ENV NODE_OPTIONS=--max_old_space_size=8192
3939

40-
RUN pnpm run sync && pnpm run build
40+
RUN pnpm run build
4141

4242
FROM nginx:1.26.3-alpine
4343

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
Appwrite Console has been built with the following frameworks:
1212

13-
- [Svelte](https://svelte.dev/)
14-
- [Svelte Kit](https://kit.svelte.dev/)
13+
- [Svelte](https://svelte.dev/)
14+
- [Svelte Kit](https://kit.svelte.dev/)
1515

1616
## Developer Experience
1717

docker/nginx.conf

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
1-
map $sent_http_content_type $cc_header {
2-
default "public, max-age=31536000";
3-
text/html "no-cache";
4-
}
5-
61
server {
72
listen 80;
83
server_name localhost;
94

10-
# serve compressed file if filename.gz exists
115
gzip_static on;
126

13-
location = /console/service-worker.js {
14-
root /usr/share/nginx/html;
15-
add_header Cache-Control "public, max-age=30" always;
7+
root /usr/share/nginx/html;
8+
9+
# Security headers for all locations
10+
add_header X-UA-Compatible "IE=Edge";
11+
add_header X-Frame-Options SAMEORIGIN;
12+
add_header X-XSS-Protection "1; mode=block;";
13+
add_header X-Content-Type-Options nosniff;
14+
15+
# Only cache files in /console/_app/immutable/ for 1 year
16+
location /console/_app/immutable/ {
17+
try_files $uri =404;
18+
19+
expires 1y;
20+
add_header Pragma public;
21+
add_header Cache-Control "public";
1622
}
1723

24+
# Cache, but revalidate, for images, css, fonts, and icons folders
25+
location ~* ^/console/(images|css|fonts|icons)/ {
26+
expires 1d;
27+
add_header Cache-Control "public, must-revalidate";
28+
}
29+
30+
# All other /console requests (no cache)
1831
location /console {
19-
root /usr/share/nginx/html;
20-
index index.html index.htm;
32+
index index.html index.html;
2133
try_files $uri /console/index.html;
2234

23-
add_header Cache-Control $cc_header always;
24-
25-
# Deny IE browsers from going into quirks mode
26-
add_header X-UA-Compatible "IE=Edge";
27-
# X-Frame-Options is to prevent from clickJacking attack
28-
add_header X-Frame-Options SAMEORIGIN;
29-
# This header enables the Cross-site scripting (XSS) filter
30-
add_header X-XSS-Protection "1; mode=block;";
31-
# disable content-type sniffing on some browsers.
32-
add_header X-Content-Type-Options nosniff;
35+
expires 0;
36+
add_header Cache-Control "no-cache, no-store";
37+
add_header Pragma "no-cache";
3338
}
3439

3540
location / {
File renamed without changes.

0 commit comments

Comments
 (0)