shift-org / shift-docs

Shift2Bikes: website and calendar for shift and pedalpalooza
https://shift2bikes.org
Other
22 stars 17 forks source link

support win dev by moving environment config #778

Open ionous opened 4 months ago

ionous commented 4 months ago

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:

fixed:

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

ionous commented 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.