Skip to content

Commit 5186e93

Browse files
committed
Merge branch 'main' into v5
2 parents 9c5f552 + 533599e commit 5186e93

File tree

19 files changed

+210
-136
lines changed

19 files changed

+210
-136
lines changed

.github/workflows/docker-latest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
-
7575
name: Run integration tests
7676
run: >-
77-
docker run --rm -u root --add-host host.docker.internal:host-gateway facilmap-ci sh -c "
77+
docker run --rm -e RUN_AS_ROOT=1 --add-host host.docker.internal:host-gateway facilmap-ci sh -c "
7878
yarn workspaces focus facilmap-integration-tests &&
7979
FACILMAP_URL=http://host.docker.internal:8080 yarn workspace facilmap-integration-tests run integration-tests &&
8080
FACILMAP_URL=http://host.docker.internal:8081 yarn workspace facilmap-integration-tests run integration-tests

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
FROM node:22-alpine
22
MAINTAINER Candid Dauth <cdauth@cdauth.eu>
33

4+
ENTRYPOINT ["/opt/facilmap/entrypoint.sh"]
45
CMD yarn run prod-server
56
EXPOSE 8080
67
ENV CACHE_DIR=/opt/facilmap/cache
8+
VOLUME /opt/facilmap/cache
79
HEALTHCHECK --start-period=60s --start-interval=3s --timeout=5s --retries=1 \
810
CMD wget -O/dev/null 'http://127.0.0.1:8080/socket.io/?EIO=4&transport=polling' || exit 1
911

@@ -23,6 +25,4 @@ RUN yarn install && \
2325
yarn run build:server && \
2426
yarn workspaces focus -A --production
2527

26-
RUN mkdir -p "$CACHE_DIR" && chown -R facilmap:facilmap "$CACHE_DIR"
27-
28-
USER facilmap
28+
RUN mkdir -p "$CACHE_DIR" && chown -R facilmap:facilmap "$CACHE_DIR"

docs/src/developers/server/docker.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ services:
3636
MAXMIND_USER_ID: # Sign up here https://www.maxmind.com/en/geolite2/signup (needed for geoip lookup to show initial map state)
3737
MAXMIND_LICENSE_KEY:
3838
LIMA_LABS_TOKEN: # Get an API key on https://maps.lima-labs.com/ (optional, needed for double-resolution tiles)
39-
restart: unless-stopped
39+
volumes:
40+
- ./cache:/opt/facilmap/cache
41+
restart: always
4042
mariadb:
4143
image: mariadb
4244
environment:
@@ -49,7 +51,7 @@ services:
4951
test: healthcheck.sh --su-mysql --connect --innodb_initialized
5052
volumes:
5153
- ./mysql:/var/lib/mysql
52-
restart: unless-stopped
54+
restart: always
5355
```
5456
5557
Here is an example with Postgres:
@@ -78,7 +80,9 @@ services:
7880
MAXMIND_USER_ID: # Sign up here https://www.maxmind.com/en/geolite2/signup (needed for geoip lookup to show initial map state)
7981
MAXMIND_LICENSE_KEY:
8082
LIMA_LABS_TOKEN: # Get an API key on https://maps.lima-labs.com/ (optional, needed for double-resolution tiles)
81-
restart: unless-stopped
83+
volumes:
84+
- ./cache:/opt/facilmap/cache
85+
restart: always
8286
postgres:
8387
image: postgis/postgis
8488
environment:
@@ -89,7 +93,7 @@ services:
8993
test: pg_isready -d $$POSTGRES_DB
9094
volumes:
9195
- ./postgis:/var/lib/postgresql/data
92-
restart: unless-stopped
96+
restart: always
9397
```
9498
9599
To start FacilMap, run `docker-compose up -d` in the directory of the `docker-compose.yml` file. To upgrade FacilMap, run `docker-compose pull` and then restart it by running `docker-compose up -d`.

entrypoint.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
chown facilmap:facilmap "$CACHE_DIR"
4+
5+
if [[ "$RUN_AS_ROOT" = 1 ]]; then
6+
exec "$@"
7+
else
8+
exec su facilmap -c "$@"
9+
fi

frontend/public/static/sw.js

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

frontend/src/i18n/en.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,11 @@
784784
"attributes-description": "The permissions for changing the marker/line name, location/waypoints, style attributes and any field values that do not have custom permissions, for markers/lines of this type.",
785785
"field": "Field"
786786
},
787+
"number-input": {
788+
"integer-error": "Please enter a valid integer.",
789+
"min-error": "Please enter a number not smaller than {{min}}.",
790+
"max-error": "Please enter a number not greater than {{max}}."
791+
},
787792
"pagination": {
788793
"first-label": "First",
789794
"previous-label": "Previous",

frontend/src/lib/components/edit-line-dialog.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@
142142
<WidthPicker
143143
:id="`${id}-width-input`"
144144
v-model="line.width"
145-
class="fm-custom-range-with-label"
146145
></WidthPicker>
147146
</div>
148147
</div>

frontend/src/lib/components/edit-marker-dialog.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@
134134
<SizePicker
135135
:id="`${id}-size-input`"
136136
v-model="marker.size"
137-
class="fm-custom-range-with-label"
138137
></SizePicker>
139138
</div>
140139
</div>

frontend/src/lib/components/edit-type-dialog/edit-type-dialog.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@
230230
<SizePicker
231231
:id="`${id}-default-size-input`"
232232
v-model="type.defaultSize"
233-
class="fm-custom-range-with-label"
234233
></SizePicker>
235234
</div>
236235
<div class="col-sm-3">
@@ -312,7 +311,6 @@
312311
<WidthPicker
313312
:id="`${id}-default-width-input`"
314313
v-model="type.defaultWidth"
315-
class="fm-custom-range-with-label"
316314
></WidthPicker>
317315
</div>
318316
<div class="col-sm-3">

frontend/src/lib/components/edit-type-dialog/edit-type-dropdown-dialog.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@
345345
<SizePicker
346346
:modelValue="option.size ?? type.defaultSize"
347347
@update:modelValue="option.size = $event"
348-
class="fm-custom-range-with-label"
349348
></SizePicker>
350349
</td>
351350
<td v-if="fieldValue.controlIcon" class="field">
@@ -364,7 +363,6 @@
364363
<WidthPicker
365364
:modelValue="option.width ?? type.defaultWidth"
366365
@update:modelValue="option.width = $event"
367-
class="fm-custom-range-with-label"
368366
></WidthPicker>
369367
</td>
370368
<td v-if="fieldValue.controlStroke" class="field">

0 commit comments

Comments
 (0)