Demo application development with docker
Clone or download
Latest commit 07c3396 Jan 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
deploy initial commit Jan 3, 2019
script add compose_run script Jan 5, 2019
src update code Jan 5, 2019
.dockerignore initial commit Jan 3, 2019
.env.example add source code and env file Jan 5, 2019
.gitignore initial commit Jan 3, 2019
Dockerfile change dockerfile Jan 5, 2019
LICENSE Initial commit Jan 2, 2019
README.md add readme file Jan 5, 2019
docker-compose.yml expose environment Jan 5, 2019

README.md

Docker app demo

Demo application development with docker. This repository is the source code for my blog post Developer hiện đại phần 2: Chạy ứng dụng trên... localhost

How to use

It's easy, just follow these steps:

Clone this repository:

$ git clone https://github.com/minhpq331/docker-app-demo.git
$ cd docker-app-demo

Make environment file, change your compose project name and put your uid and gid in

$ cp .env.example .env
$ echo $(id -u):$(id -g)
1000:1000
# This is your uid and gid, copy all this line and paste it in .env file

Install dependencies

$ script/compose_run.sh yarn

Start docker compose

$ docker-compose up

To stop running, press <Ctrl> + <C>

Useful commands

If you need to run any command with yarn, npm,... try this but remember to change your service name in script/compose_run.sh file:

$ script/compose_run.sh <your command>

After changing Dockerfile, please run this command:

$ docker-compose build

After changing your code, please stop your app with <Ctrl> + <C> and start over with docker-compose up. This behavior will be improved in my next blog.