switch to latest baseimage allowing custom TZ and UID
This commit is contained in:
+5
-4
@@ -79,11 +79,11 @@ RUN cd /srv/frontend && \
|
||||
rm -rf ./node_modules
|
||||
|
||||
|
||||
FROM umputun/baseimage:app-latest
|
||||
FROM umputun/baseimage:app
|
||||
|
||||
WORKDIR /srv
|
||||
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
ADD docker-init.sh /entrypoint.sh
|
||||
ADD backend/scripts/backup.sh /usr/local/bin/backup
|
||||
ADD backend/scripts/restore.sh /usr/local/bin/restore
|
||||
ADD backend/scripts/import.sh /usr/local/bin/import
|
||||
@@ -97,5 +97,6 @@ RUN ln -s /srv/remark42 /usr/bin/remark42
|
||||
EXPOSE 8080
|
||||
HEALTHCHECK --interval=30s --timeout=3s CMD curl --fail http://localhost:8080/ping || exit 1
|
||||
|
||||
CMD ["server"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
COPY docker-init.sh /srv/init.sh
|
||||
RUN chmod +x /srv/init.sh
|
||||
CMD ["/srv/remark42", "server"]
|
||||
|
||||
@@ -322,6 +322,39 @@ Admins/moderators should be defined in `docker-compose.yml` as a list of user ID
|
||||
To get user id just login and click on your username or any other user you want to promote to admins.
|
||||
It will expand login info and show full user ID.
|
||||
|
||||
#### Docker parameters
|
||||
|
||||
Two parameters allow to customize docker container on the system level:
|
||||
|
||||
- `APP_UID` - sets UID to run remark42 application in container (default=1001)
|
||||
- `TIME_ZONE` - sets time zone of remark42 container (default=America/Chicago)
|
||||
|
||||
_see [umputun/baseimage](https://github.com/umputun/baseimage) for more details_
|
||||
|
||||
example of compose:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
remark42:
|
||||
image: umputun/remark42:latest
|
||||
restart: always
|
||||
container_name: "remark42"
|
||||
environment:
|
||||
- APP_UID=2000 # runs remark42 app with non-default UID
|
||||
- TIME_ZINE=GTC # sets container time to UTC
|
||||
|
||||
- REMARK_URL=https://demo.remark42.com # url pointing to your remark42 server
|
||||
- SITE=YOUR_SITE_ID # site ID, same as used for `site_id`, see "Setup on your website"
|
||||
- SECRET=abcd-123456-xyz-$%^& # secret key
|
||||
- AUTH_GITHUB_CID=12345667890 # oauth2 client ID
|
||||
- AUTH_GITHUB_CSEC=abcdefg12345678 # oauth2 client secret
|
||||
volumes:
|
||||
- ./var:/srv/var # persistent volume to store all remark42 data
|
||||
```
|
||||
|
||||
|
||||
### Setup on your website
|
||||
|
||||
#### Comments
|
||||
|
||||
@@ -35,6 +35,8 @@ services:
|
||||
- "8084:8084" # local oauth2 server
|
||||
|
||||
environment:
|
||||
# - APP_UID=1000
|
||||
# - TIME_ZONE=GMT
|
||||
- REMARK_URL=http://127.0.0.1:8080
|
||||
- SECRET=12345
|
||||
- STORE_BOLT_PATH=/srv/var/db
|
||||
|
||||
@@ -6,6 +6,3 @@ sed -i "s|https://demo.remark42.com|${REMARK_URL}|g" /srv/web/*.js
|
||||
sed -i "/REMOVE-START/,/REMOVE-END/d" /srv/web/iframe.html
|
||||
|
||||
chown -R app:app /srv/var 2>/dev/null
|
||||
|
||||
echo "start remark42 server"
|
||||
/sbin/su-exec app /srv/remark42 $@
|
||||
Reference in New Issue
Block a user