Skip to content

Commit

Permalink
Set pictogram flag to false by default (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikStreek authored Jan 17, 2025
1 parent 124b789 commit 8f6eb6c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ volumes:
- Start up app necessary services

```bash
docker-compose up -d --build --force-recreate
docker compose up -d --build --force-recreate
```

- Start frontend and backend at once

```bash
docker-compose exec app npm --prefix teammapper-backend run dev
docker compose exec app npm --prefix teammapper-backend run dev
```

or start frontend and backend separately
Expand All @@ -97,10 +97,10 @@ volumes:
# Open two terminal sessions on your host machine
# In first terminal session
docker-compose exec app npm --prefix teammapper-backend start
docker compose exec app npm --prefix teammapper-backend start
# In second terminal session
docker-compose exec app npm --prefix teammapper-frontend start
docker compose exec app npm --prefix teammapper-frontend start
```

- Visit the frontend in http://localhost:4200
Expand All @@ -110,13 +110,13 @@ volumes:
- Create a test database

```bash
docker-compose exec postgres createdb -e -U teammapper-user -W teammapper-backend-test
docker compose exec postgres createdb -e -U teammapper-user -W teammapper-backend-test
```

- Execute the tests

```bash
docker-compose exec app npm -prefix teammapper-backend run test:e2e
docker compose exec app npm -prefix teammapper-backend run test:e2e
```

### Production
Expand All @@ -131,7 +131,7 @@ volumes:
- Start everything at once (including a forced build):

```bash
docker-compose --file docker-compose-prod.yml --env-file .env.prod up -d --build --force-recreate
docker compose --file docker-compose-prod.yml --env-file .env.prod up -d --build --force-recreate
```

- Go to `http://localhost:3011` (if default port is used in .env.prod) to open up teammapper. Happy mapping!
Expand All @@ -140,25 +140,25 @@ volumes:
If you want to make sure to include the most recent updates, run first:

```bash
docker-compose --file docker-compose-prod.yml --env-file .env.prod build --no-cache
docker compose --file docker-compose-prod.yml --env-file .env.prod build --no-cache
```

then:

```bash
docker-compose --file docker-compose-prod.yml --env-file .env.prod up -d --force-recreate
docker compose --file docker-compose-prod.yml --env-file .env.prod up -d --force-recreate
```

If you want to remove old data, including cached node packages and stored databases (DANGER!):

```bash
docker-compose --file docker-compose-prod.yml --env-file .env.prod down -v
docker compose --file docker-compose-prod.yml --env-file .env.prod down -v
```

If you want to run prod migrations (again):

```bash
docker-compose exec app_prod npm -prefix teammapper-backend run prod:typeorm:migrate
docker compose exec app_prod npm -prefix teammapper-backend run prod:typeorm:migrate
```
#### Postgres and SSL
If needed, you can make the connection to Postgres more secure by using a SSL connection.
Expand Down Expand Up @@ -187,24 +187,24 @@ If needed, you can make the connection to Postgres more secure by using a SSL co
Trigger delete job (also executed daily with cron task scheduler):

```
docker-compose --file docker-compose-prod.yml --env-file .env.prod exec app_prod npm --prefix teammapper-backend run prod:data:maps:cleanup
docker compose --file docker-compose-prod.yml --env-file .env.prod exec app_prod npm --prefix teammapper-backend run prod:data:maps:cleanup
```

#### Running further queries

Example of running sql via typeorm:

```
docker-compose --file docker-compose-prod.yml --env-file .env.prod exec app_prod npx --prefix teammapper-backend typeorm query "select * from mmp_node" --dataSource ./teammapper-backend/dist/data-source.js
docker compose --file docker-compose-prod.yml --env-file .env.prod exec app_prod npx --prefix teammapper-backend typeorm query "select * from mmp_node" --dataSource ./teammapper-backend/dist/data-source.js
```

### Frontend feature flags
See file /teammapper-frontend/src/envrionments/environment.prod.ts to configure feature flags:
- featureFlagPictograms: Disables/Enables the pictogram feature (default: enabled). Note: You have to set this flag before build time!
- `featureFlagPictograms`: Disables/Enables the pictogram feature (default: disabled). Note: You have to set this flag before build time!

### Further details

- Once this docker volume is initialized after the first `docker-compose up`, the database-related variables in `.env.prod` will not have any effect; please have this in mind => you will then need to setup your database manually
- Once this docker volume is initialized after the first `docker compose up`, the database-related variables in `.env.prod` will not have any effect; please have this in mind => you will then need to setup your database manually

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions teammapper-frontend/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const environment = {
production: true,
version: '0.4.0',
version: '0.1.9',
name: 'TeamMapper',
pictogramApiUrl: '/arasaac/api/pictograms',
pictogramStaticUrl: '/arasaac/images/pictograms',
featureFlagPictograms: true,
featureFlagPictograms: false,
};

0 comments on commit 8f6eb6c

Please sign in to comment.