Skip to content

Commit dff2aad

Browse files
committed
appwrite-backup
1 parent 40b6180 commit dff2aad

File tree

8 files changed

+5959
-6
lines changed

8 files changed

+5959
-6
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ⚛️ cra-template-appwrite
22

3-
> Contains the most advanced `todo-list` which you ever seen!
3+
> Contains the most advanced appwrite starter kit which you ever seen!
44
55
[![npm](https://img.shields.io/npm/v/cra-template-appwrite.svg?style=flat-square)](https://npmjs.org/package/cra-template-appwrite)
66

@@ -26,7 +26,8 @@ npx create-react-app . --template=appwrite
2626
4. [MSW](https://mswjs.io/)
2727
5. [tss-react](https://www.tss-react.dev/)
2828
6. [react-declarative](https://www.npmjs.com/package/react-declarative)
29-
7. [node-appwrite](https://www.npmjs.com/package/node-appwrite)
29+
7. [appwrite](https://www.npmjs.com/package/appwrite)
30+
8. [local-web-server](https://www.npmjs.com/package/local-web-server)
3031

3132
## Code sample
3233

scripts/backup-appwrite.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
# export MYSQL_USER=user echo $MYSQL_USER
3+
# export MYSQL_PASSWORD=password echo $MYSQL_PASSWORD
4+
docker-compose exec mariadb sh -c 'exec mysqldump --all-databases --add-drop-database -u"$MYSQL_USER" -p"$MYSQL_PASSWORD"' > ./dump.sql

scripts/cleanup-appwrite.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
# docker compose down
3+
# docker volume ls
4+
docker volume rm integration-for-gitpod_appwrite-builds
5+
docker volume rm integration-for-gitpod_appwrite-cache
6+
docker volume rm integration-for-gitpod_appwrite-certificates
7+
docker volume rm integration-for-gitpod_appwrite-config
8+
docker volume rm integration-for-gitpod_appwrite-functions
9+
docker volume rm integration-for-gitpod_appwrite-influxdb
10+
docker volume rm integration-for-gitpod_appwrite-mariadb
11+
docker volume rm integration-for-gitpod_appwrite-redis
12+
docker volume rm integration-for-gitpod_appwrite-uploads
13+
# docker compose up

scripts/restore-appwrite.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
# export MYSQL_USER=user echo $MYSQL_USER
3+
# export MYSQL_PASSWORD=password echo $MYSQL_PASSWORD
4+
docker-compose exec -T mariadb sh -c 'exec mysql -u"$MYSQL_USER" -p"$MYSQL_PASSWORD"' < dump.sql

template/db/HOWTO.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AppWrite auth credentials
2+
3+
> Login and passport for database import
4+
5+
## Admin
6+
7+
**Email:** `admin@noemail.com`
8+
9+
**Login:** `admin`
10+
11+
**Password:** `password`

template/db/dump.sql

Lines changed: 5920 additions & 0 deletions
Large diffs are not rendered by default.

template/lws.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
rewrite: [
33
{
44
from: '/(.*)',
5-
to: 'https://8080-appwrite-integrationfor-onrw45m2dan.ws-eu80.gitpod.io/$1',
5+
to: 'https://8080-appwrite-integrationfor-7cc0ys19d0b.ws-eu80.gitpod.io/$1',
66
// ^^^^^^^^ using https is important
77
// @see https://github.com/appwrite/appwrite/issues/1082
88
},

template/src/config/params.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
export const CC_APP_NAME = 'AppName';
22

3-
export const CC_APPWRITE_PROJECT = '63a02a412d6e1ca98529';
3+
export const CC_APPWRITE_PROJECT = '63b1f718287c1c2cf019';
44

55
// export const CC_APPWRITE_ENDPOINT = 'https://8080-appwrite-integrationfor-onrw45m2dan.ws-eu80.gitpod.io/v1';
66
export const CC_APPWRITE_ENDPOINT = 'http://localhost:3001/v1';
77
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
// @see npm run start:proxy
99

10-
export const CC_DB_TODO_COLLECTION_ID = '63b1c5123d181be8b187';
11-
export const CC_DB_TODO_DATABASE_ID = '63b1c50cc7de103b5249';
10+
export const CC_DB_TODO_COLLECTION_ID = '63b1f7419bd5a1eae520';
11+
export const CC_DB_TODO_DATABASE_ID = '63b1f73a5da8233847c0';
1212

1313
export const CC_MOCK_USER_EMAIL = 'user@noemail.com';
1414
export const CC_MOCK_USER_PASSWORD = 'password';

0 commit comments

Comments
 (0)