Skip to content

Commit f3ef919

Browse files
committed
work on deploy script
1 parent 5905ea5 commit f3ef919

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

deploy.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
git pull
22
python3 test_config.py
3-
sudo docker-compose build --no-cache
4-
sudo docker-compose up -d --force-recreate
5-
sudo docker logs firebase_deploy
6-
sudo docker ps -a
3+
docker-compose build --no-cache postgres
4+
docker-compose build --no-cache firebase_deploy
5+
docker-compose build --no-cache mapswipe_workers
6+
docker-compose build --no-cache manager_dashboard
7+
docker-compose build --no-cache nginx
8+
docker-compose build --no-cache api
9+
docker-compose up -d --force-recreate postgres firebase_deploy mapswipe_workers manager_dashboard nginx api
10+
docker logs firebase_deploy
11+
docker ps -a

docs/source/configuration.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ Firebase is a central part of MapSwipe. In our setup we use *Firebase Database*,
3333
1. `your_project_id`: This is the name of your Firebase project (e.g. *dev-mapswipe*)
3434
2. `your_database_name`: This is the name of your Firebase database. It is very likely that this will be the same as your Firebase project name as well.)
3535

36-
The `mapswipe_workers` module uses the [Firebase Python SDK](https://firebase.google.com/docs/reference/admin/python) to access *Firebase Database* services as administrator, you must generate a Firebase Service Account Key in JSON format. You can get it from Firebase.
37-
1. In the Firebase console, open Settings > Service Accounts.
38-
2. Click Generate New Private Key
39-
3. Store the JSON file under `mapswipe_workers/config/serviceAccountKey.json`
36+
The `mapswipe_workers` module uses the [Firebase Python SDK](https://firebase.google.com/docs/reference/admin/python) to access *Firebase Database* services as administrator, you must generate a Service Account Key file in JSON format. For this we use the previously generated Service Account Key. (Check the *Google APIs and Services Credentials* section again if you don't have it.) Copy the file to `mapswipe_workers/config/serviceAccountKey.json`.
4037

4138
The `mapswipe_workers` module further uses the [Firebase Database REST API](https://firebase.google.com/docs/reference/rest/database) to access *Firebase Database* either as a normal user or project manager.
4239

@@ -98,10 +95,7 @@ First, create a new cloud storage bucket:
9895
3. Select storage location > `Multi-Region` > `eu`
9996
4. Select storage class > `Coldline`
10097

101-
Then, generate a Google Cloud Service Account Key:
102-
1. Google Cloud Platform > IAM & Management > Service Accounts
103-
2. Create new Service Account > Select Name > e.g. `your_project_id_postgres_backup`
104-
3. Select Role > `Storage-Administrator`
98+
We need to access Google Cloud Storage. For this we use the previously generated Service Account Key. (Check the *Google APIs and Services Credentials* section again if you don't have it.) Copy the file to `postges/serviceAccountKey.json`.
10599

106100
```bash
107101
GCS_Link_URL=https://console.cloud.google.com/storage/browser/your_project_id_postgres_backup

mapswipe_workers/tests/test_00_main.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
python test_02_create_projects.py
1+
python test_01_create_projects.py
22
if [[ $? = 0 ]]; then
33
echo "success"
44
else
@@ -7,7 +7,7 @@ else
77
fi
88

99

10-
python test_03_mapping.py
10+
python test_02_mapping.py
1111
if [[ $? = 0 ]]; then
1212
echo "success"
1313
else
@@ -16,7 +16,7 @@ else
1616
fi
1717

1818

19-
python test_04_firebase_to_postgres.py
19+
python test_03_firebase_to_postgres.py
2020
if [[ $? = 0 ]]; then
2121
echo "success"
2222
else
@@ -25,7 +25,7 @@ else
2525
fi
2626

2727

28-
python test_05_generate_stats.py
28+
python test_04_generate_stats.py
2929
if [[ $? = 0 ]]; then
3030
echo "success"
3131
else
@@ -34,7 +34,7 @@ else
3434
fi
3535

3636

37-
python test_06_clean_up.py
37+
python test_05_clean_up.py
3838
if [[ $? = 0 ]]; then
3939
echo "success"
4040
else

0 commit comments

Comments
 (0)