Giter VIP home page Giter VIP logo

docker-hackmd's Introduction

docker-hackmd

Prerequisite

  • git
  • docker (docker toolbox recommended)
  • docker-compose (included in the docker toolbox)

See more here: https://www.docker.com/docker-toolbox

Get started

  1. Start you docker via Docker Quickstart Terminal, you will see a machine IP (remember that).
  2. Run git clone https://github.com/hackmdio/docker-hackmd.git.
  3. Run docker-compose up in your docker terminal.
  4. Wait until see th log HTTP Server listening at port 3000, it will take few minutes based on your internet.
  5. Open any browser and surf <machine IP>:3000

Update

Start your docker and enter the terminal, follow below commands:

cd docker-hackmd ## enter the directory
git pull ## pull new commits
docker-compose pull ## pull new containers
docker-compose up ## turn on

Backup

Start your docker and enter the terminal, follow below commands:

  • run docker ps to check all your containers
~  docker ps
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                    NAMES
2c04d7b1b8d4        dockerhackmd_hackmd   "/bin/bash /hackmd/do"   3 days ago          Up 17 seconds       0.0.0.0:3000->3000/tcp   dockerhackmd_hackmd_1
4949b888c1cb        postgres              "/docker-entrypoint.s"   3 days ago          Up 18 seconds       5432/tcp                 dockerhackmd_db-postgres_1
  • backup postgresql by docker exec <postgresql_container_id> pg_dump hackmd -U postgres > <postgresql_backup_name>
~  docker exec 4949b888c1cb pg_dump hackmd -U postgres > postgresql_backup.sql
  • copy your backup out of container by docker cp <container_id>:<backup_path> <host_path>

Happy HackMD 😄

docker-hackmd's People

Contributors

jackycute avatar a60814billy avatar a-r-g-v avatar

Watchers

James Cloos avatar Red Huang avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.