A single bash script that helps quickly setup either a DEV or DEMO environment
bash-3.2$ ./docker-run.sh
#---## This script will perform the following steps ... ## 1) Stop and remove any docker container with the name 'dev-to-postgres' and 'dev-to'# 2) Reset any storage directories if RUN_MODE starts with 'RESET-'# 3) Build the dev.to docker image, with the name of 'dev-to:dev' or 'dev-to:demo'# 4) Deploy the postgres container, mounting '_docker-storage/postgres' with the name 'dev-to-postgres'# 5) Deploy the dev-to container, with the name of 'dev-to-app', and sets up its port to 3000## To run this script properly, execute with the following (inside the dev.to repository folder)...# './docker-run.sh [RUN_MODE] [Additional docker envrionment arguments]'## Alternatively to run this script in 'interactive mode' simply run# './docker-run.sh INTERACTIVE-DEMO'##---#---## RUN_MODE can either be the following## - 'DEV' : Start up the container into bash, with a quick start guide# - 'DEMO' : Start up the container, and run dev.to (requries ALGOLIA environment variables)# - 'RESET-DEV' : Resets postgresql and upload data directory for a clean deployment, before running as DEV mode# - 'RESET-DEMO' : Resets postgresql and upload data directory for a clean deployment, before running as DEMO mode# - 'INTERACTIVE-DEMO' : Runs this script in 'interactive' mode to setup the 'DEMO'## So for example to run a development container in bash its simply# './docker-run.sh DEV'## To run a simple demo, with some dummy data (replace <?> with the actual keys)# './docker-run.sh DEMO -e ALGOLIASEARCH_APPLICATION_ID=<?> -e ALGOLIASEARCH_SEARCH_ONLY_KEY=<?> -e ALGOLIASEARCH_API_KEY=<?>'## Finally to run a working demo, you will need to provide either...# './docker-run.sh .... -e GITHUB_KEY=<?> -e GITHUB_SECRET=<?> -e GITHUB_TOKEN=<?>## And / Or ...# './docker-run.sh .... -e TWITTER_ACCESS_TOKEN=<?> -e TWITTER_ACCESS_TOKEN_SECRET=<?> -e TWITTER_KEY=<?> -e TWITTER_SECRET=<?>## Note that all of this can also be configured via ENVIRONMENT variables prior to running the script##---
And does the deployment using docker. Includes option to do a reset prior to deployment.
Native Android developer/Consultant for Appwise, I work on custom projects for clients.
PHP/JS (web) developer in my freetime. Trying to keep learning in an ever changing tech world.
Thank you for your contributions @sadarshannaiynar , @aspittel , @m1guelpf , @picocreator , @thesoreon , @lightalloy , @wuz , @rhymes , @ryankilleen , @mariocsee , @ben , @glennmen , @arnellebalane , @sashka , @vizvamitra, @shindakun , @jbbn , @mkrl , @maestromac , @glebec , @hkrogstie , @davidcelis , @turnerj , @keshavbiswa , @juliatorrejon , @fredogonzalezr , @swyx , @simevidas , @lkopacz , @mrm8488 , @butonix , @giorgosk , @maheshhost , @oscherler , @12vanblart , @john_papa , @joshcheek , @twhite , @bnb , @davefollett , @michaeltharrington , @mcataford , @heyitry , @pbeekums , @icefoxen, @jess , @eyuzwa , @selbekk , @kayis !
Thanks for the shout out! 😊
Shall shamelessly addin my pull request that finally got merge (woohoo!) - that follows up on the previously merged timber log changes.
[WIP] Feature : docker-run.sh script + docker container build #1844
What type of PR is this? (check all applicable)
Description
A single bash script that helps quickly setup either a DEV or DEMO environment
And does the deployment using docker. Includes option to do a reset prior to deployment.
Optional contextual information provided here : dev.to/uilicious/adopt-your-own-de...
Added to documentation?
What gif best describes this PR
What gif best describes how it makes you feel?
And the article explaining its context
Launch your own dev.to 🐳 server - with a single command (almost)!
Eugene Cheah
thanks for the great summary!
I was wondering how you would list all the linting PR's 😂
Happy to be able to contribute to this awesome community ❤️
Hahaha I actually spent like 15 minutes putting them in a list before I thought, "Wait this long of a list is just going to scare people away." 🙈