Skip to content

Instantly share code, notes, and snippets.

@ikikko
Last active Dec 29, 2016
Embed
What would you like to do?
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