support win dev by moving environment config #778
Draft
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:
./shift
to.env
/backend/eventimages
to/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/letsencrypt
just like production does; but windows can't use/tmp
folders.secrets.example
up
,down
,watch
, andemails
to mimic those commands from ./shift; and tweaked the npmbuild
script to output hugo files into the expected docker location. (npm run up
andnpm run down
now work, and matchshift up
andshift 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