Skip to content

Commit 909be9a

Browse files
authored
Merge pull request #1398 from opengisch/QF-6830-detault-development
chore: change the default ENVIRONMENT from test to development
2 parents a954431 + b5b33cd commit 909be9a

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

.env.example

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ DEBUG=1
1414
QFIELDCLOUD_HOST=localhost
1515

1616
# Environment where QFieldCloud runs
17-
# NOTE: the default value `test` is used to minimize changes required to run tests. Please change accordingly.
1817
# VALUES: `development` - local development; `staging` - staging server; `test` - tests; `production` - production server
19-
# DEFAULT: test
20-
ENVIRONMENT=test
18+
# DEFAULT: development
19+
ENVIRONMENT=development
2120

2221

2322
######################

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
- name: Export the env variables file
6363
run: |
6464
cp .env.example .env
65+
sed -ri 's/^ENVIRONMENT=(.*)/ENVIRONMENT=test/g' .env
6566
sed -ri 's/^COMPOSE_FILE=(.*)/COMPOSE_FILE=\1:docker-compose.override.test.yml/g' .env
6667
eval $(egrep "^[^#;]" .env | xargs -d'\n' -n1 | sed -E 's/(\w+)=(.*)/export \1='"'"'\2'"'"'/g')
6768

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,8 @@ To fetch upstream development, don't forget to update the submodules too:
4949
cp .env.example .env
5050
```
5151

52-
2. Change the `ENVIRONMENT` variable to `development`.
5352

54-
```shell
55-
ENVIRONMENT=development
56-
```
57-
58-
3. Build development images and run the containers:
53+
2. Build development images and run the containers:
5954

6055
```shell
6156
docker compose up -d --build
@@ -64,31 +59,31 @@ docker compose up -d --build
6459
The command will read the `docker-compose*.yml` files specified in the `COMPOSE_FILE` variable from the `.env` file. Then Django built-in server will be directly reachable at `http://localhost:8011` or through `nginx` at `https://localhost`.
6560
You should avoid using the Django's built-in server and better always develop and test QFieldCloud through the `nginx` [reverse proxy with SSL](#add-root-certificate).
6661

67-
4. (OPTIONAL) In case you have a database dump, you can directly load some data in your development database.
62+
3. (OPTIONAL) In case you have a database dump, you can directly load some data in your development database.
6863

6964
```shell
7065
psql 'service=localhost.qfield.cloud' < ./qfc_dump_20220304.sql
7166
```
7267

73-
5. Run Django database migrations.
68+
4. Run Django database migrations.
7469

7570
```shell
7671
docker compose exec app python manage.py migrate
7772
```
7873

79-
6. And collect the static files (CSS, JS etc):
74+
5. And collect the static files (CSS, JS etc):
8075

8176
```shell
8277
docker compose run app python manage.py collectstatic --noinput
8378
```
8479

85-
7. Now you can get started by adding your super user that has access to the Django Admin interface:
80+
6. Now you can get started by adding your super user that has access to the Django Admin interface:
8681

8782
```shell
8883
docker compose run app python manage.py createsuperuser --username super_user --email super@user.com
8984
```
9085

91-
8. If QFieldCloud needs to be translated, you can compile the translations using Django's tooling:
86+
7. If QFieldCloud needs to be translated, you can compile the translations using Django's tooling:
9287

9388
```shell
9489
docker compose run --user root app python manage.py compilemessages

0 commit comments

Comments
 (0)