diff --git a/.gitignore b/.gitignore index c6fcec5..69d0397 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .env .env.production -docker \ No newline at end of file +docker +dist \ No newline at end of file diff --git a/README.md b/README.md index b027448..05dfea2 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,26 @@ HASURA_GRAPHQL_ADMIN_SECRET=secret # at least 32 characters AUTH_JWT_SECRET=secret ``` + +## Building and transfering an image in production + +### 1. Build & Save the production docker image + +```sh +# build image for production +docker-compose -f docker-compose.yml build +# find image id +docker images +# save image +docker save --output dist/.tar +``` + +### 2. Load and tag Image in production environment + +```sh +sudo docker load --input path/to/.tar +# find image id +sudo docker images +# tag image +sudo docker tag +``` \ No newline at end of file