support win dev by moving environment config#778
Draft
ionous wants to merge 1 commit intoshift-org:mainfrom
Draft
support win dev by moving environment config#778ionous wants to merge 1 commit intoshift-org:mainfrom
ionous wants to merge 1 commit intoshift-org:mainfrom
Conversation
windows can't run bash scripts without linux for windows ( which imposes some extra headaches for shift development; setup of wsl, permission issues, etc. ) but, the bash script sets up the environment needed for docker compose to work ( which is why we can't use "docker compose" directly at the command line ) docker does, however, support a ".env" file next to the compose file just for this purpose. changes: - moved envvars from ./shift to .env - for letsencrypt and eventimages, put the required production paths in shift.overrides.production ( because these two had/need special handling ) - moved local event images from "/backend/eventimages" to "/app/eventimages" . the latter is what "npm run dev" uses and makes fake event creation work inside docker ( granted both should probably be using /bin/eventimages or something ) - added a new placeholder directory "./services/nginx/letsencrypt/". this placeholder is only used for development. previously mac/linux dev would use "/tmp/letsencrypt" just like production does; but windows can't use "/tmp" folders. - removed unused envvars from the 'secrets.example' - for windows users: added npm scripts for up, down, watch, and emails to mimic those commands from ./shift; and tweaked the npm build script to build hugo into the expected docker location. - updated the readme to describe the windows steps - moved the old, probably inaccurate local netlify development steps from the readme to a separate doc file with notes fixed: - fixed: the node container in docker-compose.yml should have been using the EVENTIMAGES envvar just like nginx does ( at the top of the file )
Contributor
Author
|
leaving this as a draft for now. |
Member
|
Maybe we can work with @aaronminnick since he's got the windows. I feel like we want to finish up the work in #772 and then #774 before we continue down this path, though - does that make sense to you @ionous ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
windows can't run bash scripts without linux for windows ( which imposes some extra headaches for shift development; setup of wsl, permission issues, etc. )
the bash script sets up the environment needed for docker compose to work ( which is why we can't use "docker compose" directly at the command line; but after this, we can. )
docker does, however, support a ".env" file next to the compose file just for this purpose.
changes:
./shiftto.env/backend/eventimagesto/app/eventimages. the latter is what "npm run dev" uses and makes fake event creation work inside docker ( really, dev should probably be using/bin/eventimages; and docker should be using a volume.... but that's a whole different can of tomatoes )./services/nginx/letsencrypt/. this placeholder is only used for development. previously mac/linux dev would use/tmp/letsencryptjust like production does; but windows can't use/tmpfolders.secrets.exampleup,down,watch, andemailsto mimic those commands from ./shift; and tweaked the npmbuildscript to output hugo files into the expected docker location. (npm run upandnpm run downnow work, and matchshift upandshift down)npm run docker-create-events-- which if docker is running, will create a handful of fake events inside mysqlfixed:
the node container in docker-compose.yml should have been using the EVENTIMAGES envvar just like nginx does:
shift-docs/docker-compose.yml
Line 17 in aa2dec3
^ the ngnix container conf. vs, the current, not quite correct, node container conf:
shift-docs/docker-compose.yml
Line 100 in aa2dec3