Closed sbrown345 closed 7 years ago
I'm not sure if these are things to fix but it might help someone else and/or be useful in the readme.
To get this working with swarm mode I had to set HOSTNAME to nothing and use /dev/shm instead of setting shm_size.
docker service create --name ers --mount type=tmpfs,dst=/dev/shm,tmpfs-size=134217728 -e RENDERER_ACCESS_KEY=changeme -e HOSTNAME= --publish 3000:3000 msokk/electron-render-service
Or the compose file:
version: '3' services: electronrenderservice: image: msokk/electron-render-service ports: - "3000:3000" environment: - RENDERER_ACCESS_KEY=changeme - HOSTNAME= volumes: - /dev/shm:/dev/shm
To test: http://localhost:3000/pdf?accessKey=changeme&url=http%3A%2F%2Fgoogle.com
A bit of googling shows that --shm-size is not yet implented - https://github.com/moby/moby/issues/26714, but I wonder why the HOSTNAME needs to be blank...
--shm-size
HOSTNAME
Added a note to README under Docker.
I'm not sure if these are things to fix but it might help someone else and/or be useful in the readme.
To get this working with swarm mode I had to set HOSTNAME to nothing and use /dev/shm instead of setting shm_size.
docker service create --name ers --mount type=tmpfs,dst=/dev/shm,tmpfs-size=134217728 -e RENDERER_ACCESS_KEY=changeme -e HOSTNAME= --publish 3000:3000 msokk/electron-render-service
Or the compose file:
To test: http://localhost:3000/pdf?accessKey=changeme&url=http%3A%2F%2Fgoogle.com