Open ionous opened 4 months ago
leaving this as a draft for now. i still need to do some more testing on my windows and mac machines. and we will want to ensure that the docker version on production actually supports env files(!) before using this there.
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: https://github.com/shift-org/shift-docs/blob/aa2dec31f0841c5c2abace4ea07c5990b7cddc41/docker-compose.yml#L17 ^ the ngnix container conf. vs, the current, not quite correct, node container conf: https://github.com/shift-org/shift-docs/blob/aa2dec31f0841c5c2abace4ea07c5990b7cddc41/docker-compose.yml#L100