Skip to content

Instantly share code, notes, and snippets.

@ikikko
Last active December 29, 2016 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikikko/950a20c08d5d261a4f05ffd1abd4929b to your computer and use it in GitHub Desktop.
Save ikikko/950a20c08d5d261a4f05ffd1abd4929b to your computer and use it in GitHub Desktop.
docker-hackmd customize
hackmdPostgres:
image: postgres
environment:
- POSTGRES_USER=hackmd
- POSTGRES_PASSWORD=hackmdpass
- POSTGRES_DB=hackmd
hackmd:
image: hackmdio/hackmd:0.4.6
environment:
- POSTGRES_USER=hackmd
- POSTGRES_PASSWORD=hackmdpass
links:
- hackmdPostgres
ports:
- "3000:3000"
volumes:
- /home/ec2-user/docker-hackmd/customize/config.json:/hackmd/config.json
- /home/ec2-user/docker-hackmd/customize/link-to-backlog.js:/tmp/link-to-backlog.js
command: >
bash -c "
# link to backlog
if ! grep -q 'customize ---' /hackmd/public/build/*.index.*.js ; then
cat /tmp/link-to-backlog.js >> /hackmd/public/build/*.index.*.js
echo 'add customize process to build/*.index.*.js'
fi
# default command
/bin/bash /hackmd/docker-entrypoint.sh
"
nginx:
image: nginx
links:
- hackmd
ports:
- "80:80"
volumes:
- /home/ec2-user/docker-hackmd/customize/nginx.conf:/etc/nginx/conf.d/default.conf
- /home/ec2-user/docker-hackmd/customize/.htpasswd:/etc/nginx/.htpasswd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment