mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
build: setup docker-compose.dev.yml dev iteration
This is based off of the 5-commit branch at https://github.com/neobooru/szurubooru/blob/docker-development-setup. Compared to said branch, we * Exclude extraneous changes such as * Any formatting * The use of deprecated/ineffectual top-level `version:` in composer files * Support controlling $THREADS (modernizing the branch to upstream) * Integrate into master more cleanly However, client/docker-start-dev uses a temporary hack -- due to volume mounting overwriting node_modules at arbitrary points during the `docker compose build` step, we run `npm i` before any given `npm run watch`. To see the effects of this commit in action, run: docker compose -f ./docker-compose.dev.yml up
This commit is contained in:
17
client/docker-start-dev.sh
Executable file
17
client/docker-start-dev.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/dumb-init /bin/sh
|
||||
|
||||
# Integrate environment variables
|
||||
sed -i "s|__BACKEND__|${BACKEND_HOST}|" \
|
||||
/etc/nginx/nginx.conf
|
||||
|
||||
# Start server
|
||||
nginx &
|
||||
|
||||
# Watch source for changes and build app
|
||||
# FIXME: It's not ergonomic to run `npm i` outside of the build step.
|
||||
# However, the mounting of different directories into the
|
||||
# client container's /opt/app causes node_modules to disappear
|
||||
# (the mounting causes client/Dockerfile's RUN npm install
|
||||
# to silently clobber).
|
||||
# Find a way to move `npm i` into client/Dockerfile.
|
||||
npm i && npm run watch -- --polling
|
Reference in New Issue
Block a user