Skip to content

Commit 52cbd4d

Browse files
authored
Content final (#54)
* v0.5.0 * fix: correct Dockerfile for pywb * fix: set singleClick to false for Filebrowser * fix: pywb not loading head_insert.html file * fix: minimal and white edt logo for interface * chore: better white logo * chore: expose mapeo configs and mbtiles over http * fix: don't run db:seed on terrastories * fix: create firstboot file on config dir for syncthing * fix: persist config directory for syncthing db * fix: minor fix on syncthing config * chore: add syncthing fix to demo and local dockerfiles * chore: update portal to use latest docker image tag * chore: update portal to use latest docker image tag on demo and local
1 parent 10cdca4 commit 52cbd4d

File tree

11 files changed

+51
-35
lines changed

11 files changed

+51
-35
lines changed

balena.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Earth Defender's Toolkit Offline"
22
type: "sw.application"
3-
version: 0.4.9
3+
version: 0.5.0
44
description: "A low-energy device that creates an access-point serving applications, bridging them and exposing curated content offline.
55
Software stack and content are automatically updated while online, and can be updated offline."
66
assets:

docker-compose.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ version: "2.1"
33
volumes:
44
interface_db:
55
wifi_db:
6+
syncthing:
67
fdroid:
78
mapeo:
89
crawls:
910
pywb-archive:
1011
installers:
1112
postgres_data:
1213
mbtiles:
13-
bundler:
14+
terrastories-bundler:
1415
terrastories-media:
1516
terrastories-import:
1617
pataka:
@@ -54,7 +55,7 @@ services:
5455
privileged: true # This can be removed if you do not need the LED connectivity indicator.
5556
# https://hub.docker.com/r/communityfirst/edt-offline-edt-portal
5657
portal:
57-
image: communityfirst/edt-offline-portal:nightly
58+
image: communityfirst/edt-offline-portal:latest
5859
restart: always
5960
ports:
6061
- 8080:3000
@@ -86,11 +87,12 @@ services:
8687
syncthing:
8788
build: services/syncthing
8889
volumes:
89-
- crawls:/config/websites
90-
- mapeo:/config/mapeo
91-
- fdroid:/config/fdroid
92-
- installers:/config/installers
93-
- mbtiles:/config/mbtiles
90+
- syncthing:/config
91+
- crawls:/data/websites
92+
- mapeo:/data/mapeo
93+
- fdroid:/data/fdroid
94+
- installers:/data/installers
95+
- mbtiles:/data/mbtiles
9496
ports:
9597
- 8082:8384
9698
- 22000:22000/tcp
@@ -121,7 +123,7 @@ services:
121123
CHOKIDAR_USEPOLLING: 'true'
122124
SECRET_KEY_BASE: "a845b372237fe58988e8fb7698b9a7b61f8cc7581dc685387ff1cb8ec5f250d57b733379d53f5c3e7b816d0bf0fdf5f7b02558c64b932903e5ec3fbe10c4b205"
123125
volumes:
124-
- bundler:/usr/local/bundle
126+
- terrastories-bundler:/usr/local/bundle
125127
- terrastories-media:/media
126128
- terrastories-import:/api/import/media
127129
restart: unless-stopped
@@ -150,6 +152,8 @@ services:
150152
volumes:
151153
- installers:/usr/local/apache2/htdocs/installers
152154
- fdroid:/usr/local/apache2/htdocs/repo
155+
- mapeo:/usr/local/apache2/htdocs/mapeo
156+
- mbtiles:/usr/local/apache2/htdocs/mbtiles
153157
restart: unless-stopped
154158
# https://hub.docker.com/r/communityfirst/pataka-cli
155159
pataka:

docker/demo/docker-compose.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ version: '2.1'
33
volumes:
44
fdroid:
55
mapeo:
6+
syncthing:
67
crawls:
78
pywb-archive:
89
minio-data:
@@ -11,13 +12,13 @@ volumes:
1112
# Terrastories
1213
postgres_data:
1314
mbtiles:
14-
bundler:
15+
terrastories-bundler:
1516
terrastories-data:
1617
terrastories-media:
1718
terrastories-import:
1819
services:
1920
portal:
20-
image: communityfirst/edt-offline-portal:nightly
21+
image: communityfirst/edt-offline-portal:latest
2122
restart: always
2223
ports:
2324
- 80:3000
@@ -73,11 +74,12 @@ services:
7374
SYNC_TILES_ID: ${SYNC_TILES_ID}
7475
SYNC_TILES_NAME: ${SYNC_TILES_NAME}
7576
volumes:
76-
- crawls:/config/websites
77-
- mapeo:/config/mapeo
78-
- fdroid:/config/fdroid
79-
- installers:/config/installers
80-
- mbtiles:/config/mbtiles
77+
- syncthing:/config
78+
- crawls:/data/websites
79+
- mapeo:/data/mapeo
80+
- fdroid:/data/fdroid
81+
- installers:/data/installers
82+
- mbtiles:/data/mbtiles
8183
ports:
8284
- 8082:8384
8385
- 22000:22000/tcp
@@ -109,6 +111,8 @@ services:
109111
volumes:
110112
- installers:/usr/local/apache2/htdocs/installers
111113
- fdroid:/usr/local/apache2/htdocs/repo
114+
- mapeo:/usr/local/apache2/htdocs/mapeo
115+
- mbtiles:/usr/local/apache2/htdocs/mbtiles
112116
terrastories-db:
113117
image: postgres:11
114118
ports:
@@ -136,7 +140,7 @@ services:
136140
MAPBOX_ACCESS_TOKEN: ${MAPBOX_ACCESS_TOKEN}
137141
SECRET_KEY_BASE: "a845b372237fe58988e8fb7698b9a7b61f8cc7581dc685387ff1cb8ec5f250d57b733379d53f5c3e7b816d0bf0fdf5f7b02558c64b932903e5ec3fbe10c4b205"
138142
volumes:
139-
- bundler:/usr/local/bundle
143+
- terrastories-bundler:/usr/local/bundle
140144
- terrastories-data:/api
141145
- terrastories-media:/media
142146
- terrastories-import:/api/import/media

docker/local/docker-compose.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ version: '2.1'
33
volumes:
44
fdroid:
55
mapeo:
6+
syncthing:
67
crawls:
78
pywb-archive:
89
installers:
910
postgres_data:
1011
mbtiles:
11-
bundler:
12+
terrastories-bundler:
1213
terrastories-media:
1314
terrastories-import:
1415
pataka:
@@ -25,7 +26,7 @@ services:
2526
PORTAL_SSID: ${PORTAL_SSID}
2627
# https://hub.docker.com/r/communityfirst/edt-offline-edt-portal
2728
portal:
28-
image: communityfirst/edt-offline-portal:nightly
29+
image: communityfirst/edt-offline-portal:latest
2930
restart: always
3031
ports:
3132
- 8080:3000
@@ -57,11 +58,12 @@ services:
5758
syncthing:
5859
build: ../../services/syncthing
5960
volumes:
60-
- crawls:/config/websites
61-
- mapeo:/config/mapeo
62-
- fdroid:/config/fdroid
63-
- installers:/config/installers
64-
- mbtiles:/config/mbtiles
61+
- syncthing:/config
62+
- crawls:/data/websites
63+
- mapeo:/data/mapeo
64+
- fdroid:/data/fdroid
65+
- installers:/data/installers
66+
- mbtiles:/data/mbtiles
6567
ports:
6668
- 8082:8384
6769
- 22000:22000/tcp
@@ -92,7 +94,7 @@ services:
9294
CHOKIDAR_USEPOLLING: 'true'
9395
SECRET_KEY_BASE: "a845b372237fe58988e8fb7698b9a7b61f8cc7581dc685387ff1cb8ec5f250d57b733379d53f5c3e7b816d0bf0fdf5f7b02558c64b932903e5ec3fbe10c4b205"
9496
volumes:
95-
- bundler:/usr/local/bundle
97+
- terrastories-bundler:/usr/local/bundle
9698
- terrastories-media:/media
9799
- terrastories-import:/api/import/media
98100
restart: unless-stopped
@@ -121,6 +123,8 @@ services:
121123
volumes:
122124
- installers:/usr/local/apache2/htdocs/installers
123125
- fdroid:/usr/local/apache2/htdocs/repo
126+
- mapeo:/usr/local/apache2/htdocs/mapeo
127+
- mbtiles:/usr/local/apache2/htdocs/mbtiles
124128
restart: unless-stopped
125129
# https://hub.docker.com/r/communityfirst/pataka-cli
126130
pataka:

services/filebrowser/custom/filebrowser.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"scope": "./users",
99
"locale": "#LOCALE",
1010
"viewMode": "list",
11-
"singleClick": true,
11+
"singleClick": false,
1212
"sorting": {
1313
"by": "name",
1414
"asc": false
-385 KB
Loading
-391 KB
Loading

services/pywb/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
FROM webrecorder/pywb
22

33
COPY start.sh /tmp
4-
ENTRYPOINT ["sh", "/tmp/start.sh"]
54
COPY config.yaml /webarchive/config.yaml
5+
RUN mkdir -p /webarchive/templates
66
COPY head_insert.html /webarchive/templates/head_insert.html
7+
8+
ENTRYPOINT ["sh", "/tmp/start.sh"]

services/syncthing/cont-init.d/99-custom-files.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/with-contenv bash
22
# shellcheck shell=bash
33

4-
file=firstboot
4+
file=/config/firstboot
55

66
if [ ! -e "$file" ]; then
77
echo "First run!"
@@ -21,7 +21,9 @@ if [ ! -e "$file" ]; then
2121
sed -i -r "s/#TILES_NAME/$SYNC_TILES_NAME/g" /config/config.xml
2222
echo "=======" "Adding authentication and setting permissions" "====="
2323
syncthing generate --home=/config --gui-user=${ADMIN_LOGIN} --gui-password=${ADMIN_PASSWORD}
24+
mkdir -p /data
2425
chown -R 1000:1000 /config
26+
chown -R 1000:1000 /data
2527
touch "$file"
2628
fi
2729

services/syncthing/default-config.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<configuration version="36">
2-
<folder id="#TILES_ID" label="#TILES_NAME" path="/config/mbtiles" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
2+
<folder id="#TILES_ID" label="#TILES_NAME" path="/data/mbtiles" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
33
<filesystemType>basic</filesystemType>
44
<device id="#SOURCE_ID" introducedBy="">
55
<encryptionPassword></encryptionPassword>
@@ -32,7 +32,7 @@
3232
<caseSensitiveFS>false</caseSensitiveFS>
3333
<junctionsAsDirs>false</junctionsAsDirs>
3434
</folder>
35-
<folder id="#INSTALLERS_ID" label="#INSTALLERS_NAME" path="/config/installers" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
35+
<folder id="#INSTALLERS_ID" label="#INSTALLERS_NAME" path="/data/installers" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
3636
<filesystemType>basic</filesystemType>
3737
<device id="#SOURCE_ID" introducedBy="">
3838
<encryptionPassword></encryptionPassword>
@@ -65,7 +65,7 @@
6565
<caseSensitiveFS>false</caseSensitiveFS>
6666
<junctionsAsDirs>false</junctionsAsDirs>
6767
</folder>
68-
<folder id="#MAPEO_ID" label="#MAPEO_NAME" path="/config/mapeo" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
68+
<folder id="#MAPEO_ID" label="#MAPEO_NAME" path="/data/mapeo" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
6969
<filesystemType>basic</filesystemType>
7070
<device id="#SOURCE_ID" introducedBy="">
7171
<encryptionPassword></encryptionPassword>
@@ -98,7 +98,7 @@
9898
<caseSensitiveFS>false</caseSensitiveFS>
9999
<junctionsAsDirs>false</junctionsAsDirs>
100100
</folder>
101-
<folder id="#FDROID_ID" label="#FDROID_NAME" path="/config/fdroid" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
101+
<folder id="#FDROID_ID" label="#FDROID_NAME" path="/data/fdroid" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
102102
<filesystemType>basic</filesystemType>
103103
<device id="#SOURCE_ID" introducedBy="">
104104
<encryptionPassword></encryptionPassword>
@@ -131,7 +131,7 @@
131131
<caseSensitiveFS>false</caseSensitiveFS>
132132
<junctionsAsDirs>false</junctionsAsDirs>
133133
</folder>
134-
<folder id="#CRAWLS_ID" label="#CRAWLS_NAME" path="/config/websites" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
134+
<folder id="#CRAWLS_ID" label="#CRAWLS_NAME" path="/data/websites" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
135135
<filesystemType>basic</filesystemType>
136136
<device id="#SOURCE_ID" introducedBy="">
137137
<encryptionPassword></encryptionPassword>
@@ -226,7 +226,7 @@
226226
<insecureAllowOldTLSVersions>false</insecureAllowOldTLSVersions>
227227
</options>
228228
<defaults>
229-
<folder id="" label="" path="/config/data" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
229+
<folder id="" label="" path="/data/data" type="receiveonly" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
230230
<filesystemType>basic</filesystemType>
231231
<minDiskFree unit="%">1</minDiskFree>
232232
<versioning>

0 commit comments

Comments
 (0)