From 1ec97b86e852d026f4d9aca47257009104099876 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 14:36:21 -0500 Subject: [PATCH 01/15] Move Dockerfiles to flatter install hierarchy. --- install/dev/{digitalocean => }/api/Dockerfile | 0 install/dev/{digitalocean => }/redis/Dockerfile | 0 install/dev/{digitalocean => }/redis/redis.conf | 0 install/dev/{digitalocean => }/web/Dockerfile | 0 install/local/{dev => }/api/Dockerfile | 0 install/local/{dev => }/docker-compose.dev.yaml | 0 install/local/{dev => }/docker-compose.yaml | 0 install/local/{dev => }/minio/Dockerfile | 0 install/local/{dev => }/minio/docker-entrypoint.sh | 0 install/local/{dev => }/minio/healthcheck.sh | 0 install/local/{dev => }/nginx/Dockerfile | 0 install/local/{dev => }/postgres/Dockerfile | 0 install/local/{dev => }/redis/Dockerfile | 0 install/local/{dev => }/redis/redis.conf | 0 install/local/{dev => }/web/Dockerfile | 0 install/{aws/prod/docker => prod}/api/Dockerfile | 0 install/{aws/prod/docker => prod}/postgres/Dockerfile | 0 install/{aws/prod/docker => prod}/web/Dockerfile | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename install/dev/{digitalocean => }/api/Dockerfile (100%) rename install/dev/{digitalocean => }/redis/Dockerfile (100%) rename install/dev/{digitalocean => }/redis/redis.conf (100%) rename install/dev/{digitalocean => }/web/Dockerfile (100%) rename install/local/{dev => }/api/Dockerfile (100%) rename install/local/{dev => }/docker-compose.dev.yaml (100%) rename install/local/{dev => }/docker-compose.yaml (100%) rename install/local/{dev => }/minio/Dockerfile (100%) rename install/local/{dev => }/minio/docker-entrypoint.sh (100%) rename install/local/{dev => }/minio/healthcheck.sh (100%) rename install/local/{dev => }/nginx/Dockerfile (100%) rename install/local/{dev => }/postgres/Dockerfile (100%) rename install/local/{dev => }/redis/Dockerfile (100%) rename install/local/{dev => }/redis/redis.conf (100%) rename install/local/{dev => }/web/Dockerfile (100%) rename install/{aws/prod/docker => prod}/api/Dockerfile (100%) rename install/{aws/prod/docker => prod}/postgres/Dockerfile (100%) rename install/{aws/prod/docker => prod}/web/Dockerfile (100%) diff --git a/install/dev/digitalocean/api/Dockerfile b/install/dev/api/Dockerfile similarity index 100% rename from install/dev/digitalocean/api/Dockerfile rename to install/dev/api/Dockerfile diff --git a/install/dev/digitalocean/redis/Dockerfile b/install/dev/redis/Dockerfile similarity index 100% rename from install/dev/digitalocean/redis/Dockerfile rename to install/dev/redis/Dockerfile diff --git a/install/dev/digitalocean/redis/redis.conf b/install/dev/redis/redis.conf similarity index 100% rename from install/dev/digitalocean/redis/redis.conf rename to install/dev/redis/redis.conf diff --git a/install/dev/digitalocean/web/Dockerfile b/install/dev/web/Dockerfile similarity index 100% rename from install/dev/digitalocean/web/Dockerfile rename to install/dev/web/Dockerfile diff --git a/install/local/dev/api/Dockerfile b/install/local/api/Dockerfile similarity index 100% rename from install/local/dev/api/Dockerfile rename to install/local/api/Dockerfile diff --git a/install/local/dev/docker-compose.dev.yaml b/install/local/docker-compose.dev.yaml similarity index 100% rename from install/local/dev/docker-compose.dev.yaml rename to install/local/docker-compose.dev.yaml diff --git a/install/local/dev/docker-compose.yaml b/install/local/docker-compose.yaml similarity index 100% rename from install/local/dev/docker-compose.yaml rename to install/local/docker-compose.yaml diff --git a/install/local/dev/minio/Dockerfile b/install/local/minio/Dockerfile similarity index 100% rename from install/local/dev/minio/Dockerfile rename to install/local/minio/Dockerfile diff --git a/install/local/dev/minio/docker-entrypoint.sh b/install/local/minio/docker-entrypoint.sh similarity index 100% rename from install/local/dev/minio/docker-entrypoint.sh rename to install/local/minio/docker-entrypoint.sh diff --git a/install/local/dev/minio/healthcheck.sh b/install/local/minio/healthcheck.sh similarity index 100% rename from install/local/dev/minio/healthcheck.sh rename to install/local/minio/healthcheck.sh diff --git a/install/local/dev/nginx/Dockerfile b/install/local/nginx/Dockerfile similarity index 100% rename from install/local/dev/nginx/Dockerfile rename to install/local/nginx/Dockerfile diff --git a/install/local/dev/postgres/Dockerfile b/install/local/postgres/Dockerfile similarity index 100% rename from install/local/dev/postgres/Dockerfile rename to install/local/postgres/Dockerfile diff --git a/install/local/dev/redis/Dockerfile b/install/local/redis/Dockerfile similarity index 100% rename from install/local/dev/redis/Dockerfile rename to install/local/redis/Dockerfile diff --git a/install/local/dev/redis/redis.conf b/install/local/redis/redis.conf similarity index 100% rename from install/local/dev/redis/redis.conf rename to install/local/redis/redis.conf diff --git a/install/local/dev/web/Dockerfile b/install/local/web/Dockerfile similarity index 100% rename from install/local/dev/web/Dockerfile rename to install/local/web/Dockerfile diff --git a/install/aws/prod/docker/api/Dockerfile b/install/prod/api/Dockerfile similarity index 100% rename from install/aws/prod/docker/api/Dockerfile rename to install/prod/api/Dockerfile diff --git a/install/aws/prod/docker/postgres/Dockerfile b/install/prod/postgres/Dockerfile similarity index 100% rename from install/aws/prod/docker/postgres/Dockerfile rename to install/prod/postgres/Dockerfile diff --git a/install/aws/prod/docker/web/Dockerfile b/install/prod/web/Dockerfile similarity index 100% rename from install/aws/prod/docker/web/Dockerfile rename to install/prod/web/Dockerfile From b35e18e84f9aa616f7cdcc67db03fdb00f816a01 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 15:35:20 -0500 Subject: [PATCH 02/15] Reorganize tiers and files. Use symlinks for common files, also rename files -> common. --- install/{files => common}/api/health-check.sh | 0 install/{files => common}/postgres/health-check.sh | 0 install/{files => common}/postgres/init/01-setup.sh | 0 install/{files => common}/postgres/init/02-seed.sql | 0 install/dev/api/Dockerfile | 8 ++++---- install/{files/dev => dev/api}/deepwell-start | 0 install/{files/dev => dev/api}/deepwell.toml | 0 install/dev/api/health-check.sh | 1 + install/dev/redis/Dockerfile | 2 +- install/files/dev/ssl.conf | 2 -- install/local/api/Dockerfile | 6 +++--- install/{files/local => local/api}/deepwell-start | 0 install/{files/local => local/api}/deepwell.toml | 0 install/local/api/health-check.sh | 1 + install/local/nginx/Dockerfile | 12 ++++++------ install/{files => local}/nginx/ffdhe2048.txt | 0 install/{files => local}/nginx/gzip.conf | 0 install/{files => local}/nginx/nginx.conf | 0 install/{files => local}/nginx/proxy.conf | 0 install/{files/local => local/nginx}/ssl.conf | 0 install/{files/local => local/nginx}/web.conf | 0 install/local/postgres/Dockerfile | 4 ++-- install/prod/api/Dockerfile | 4 ++-- install/{files/prod => prod/api}/deepwell.toml | 0 install/prod/api/health-check.sh | 1 + install/prod/postgres/Dockerfile | 4 ++-- 26 files changed, 23 insertions(+), 22 deletions(-) rename install/{files => common}/api/health-check.sh (100%) rename install/{files => common}/postgres/health-check.sh (100%) rename install/{files => common}/postgres/init/01-setup.sh (100%) rename install/{files => common}/postgres/init/02-seed.sql (100%) rename install/{files/dev => dev/api}/deepwell-start (100%) rename install/{files/dev => dev/api}/deepwell.toml (100%) create mode 120000 install/dev/api/health-check.sh delete mode 100644 install/files/dev/ssl.conf rename install/{files/local => local/api}/deepwell-start (100%) rename install/{files/local => local/api}/deepwell.toml (100%) create mode 120000 install/local/api/health-check.sh rename install/{files => local}/nginx/ffdhe2048.txt (100%) rename install/{files => local}/nginx/gzip.conf (100%) rename install/{files => local}/nginx/nginx.conf (100%) rename install/{files => local}/nginx/proxy.conf (100%) rename install/{files/local => local/nginx}/ssl.conf (100%) rename install/{files/local => local/nginx}/web.conf (100%) rename install/{files/prod => prod/api}/deepwell.toml (100%) create mode 120000 install/prod/api/health-check.sh diff --git a/install/files/api/health-check.sh b/install/common/api/health-check.sh similarity index 100% rename from install/files/api/health-check.sh rename to install/common/api/health-check.sh diff --git a/install/files/postgres/health-check.sh b/install/common/postgres/health-check.sh similarity index 100% rename from install/files/postgres/health-check.sh rename to install/common/postgres/health-check.sh diff --git a/install/files/postgres/init/01-setup.sh b/install/common/postgres/init/01-setup.sh similarity index 100% rename from install/files/postgres/init/01-setup.sh rename to install/common/postgres/init/01-setup.sh diff --git a/install/files/postgres/init/02-seed.sql b/install/common/postgres/init/02-seed.sql similarity index 100% rename from install/files/postgres/init/02-seed.sql rename to install/common/postgres/init/02-seed.sql diff --git a/install/dev/api/Dockerfile b/install/dev/api/Dockerfile index c9062047d4..09a36e4804 100644 --- a/install/dev/api/Dockerfile +++ b/install/dev/api/Dockerfile @@ -40,10 +40,10 @@ COPY --from=rust /usr/local/cargo/bin/sqlx /usr/local/cargo/bin/sqlx COPY --from=rust /src/deepwell/target/release/deepwell /usr/local/bin/deepwell COPY --from=rust /src/deepwell/migrations /opt/database/migrations COPY --from=rust /src/deepwell/seeder /opt/database/seeder -COPY install/files/dev/deepwell.toml /etc/deepwell.toml -COPY install/files/dev/deepwell-start /usr/local/bin/wikijump-deepwell-start -COPY install/files/api/health-check.sh /usr/local/bin/wikijump-health-check -COPY locales/fluent /opt/locales/fluent +COPY ./install/dev/api/deepwell.toml /etc/deepwell.toml +COPY ./install/dev/api/deepwell-start /usr/local/bin/wikijump-deepwell-start +COPY ./install/dev/api/health-check.sh /usr/local/bin/wikijump-health-check +COPY ./locales/fluent /opt/locales/fluent USER daemon EXPOSE 2747 diff --git a/install/files/dev/deepwell-start b/install/dev/api/deepwell-start similarity index 100% rename from install/files/dev/deepwell-start rename to install/dev/api/deepwell-start diff --git a/install/files/dev/deepwell.toml b/install/dev/api/deepwell.toml similarity index 100% rename from install/files/dev/deepwell.toml rename to install/dev/api/deepwell.toml diff --git a/install/dev/api/health-check.sh b/install/dev/api/health-check.sh new file mode 120000 index 0000000000..03329b7bcb --- /dev/null +++ b/install/dev/api/health-check.sh @@ -0,0 +1 @@ +../../common/api/health-check.sh \ No newline at end of file diff --git a/install/dev/redis/Dockerfile b/install/dev/redis/Dockerfile index 5ef8b57c31..118c7c011e 100644 --- a/install/dev/redis/Dockerfile +++ b/install/dev/redis/Dockerfile @@ -1,5 +1,5 @@ FROM redis:alpine EXPOSE 6379 -COPY ./install/dev/digitalocean/redis/redis.conf /usr/local/etc/redis.conf +COPY ./install/dev/redis/redis.conf /usr/local/etc/redis.conf CMD ["redis-server", "/usr/local/etc/redis.conf"] diff --git a/install/files/dev/ssl.conf b/install/files/dev/ssl.conf deleted file mode 100644 index 305898f1b0..0000000000 --- a/install/files/dev/ssl.conf +++ /dev/null @@ -1,2 +0,0 @@ -ssl_certificate /etc/ssl/certs/$domain_name.crt; -ssl_certificate_key /etc/ssl/private/$domain_name.key; diff --git a/install/local/api/Dockerfile b/install/local/api/Dockerfile index 5afb44c5c1..5253bc457b 100644 --- a/install/local/api/Dockerfile +++ b/install/local/api/Dockerfile @@ -16,9 +16,9 @@ RUN apt install -y libmagic-dev RUN cargo install cargo-watch sqlx-cli # Install files -COPY install/files/local/deepwell.toml /etc/deepwell.toml -COPY install/files/local/deepwell-start /usr/local/bin/wikijump-deepwell-start -COPY install/files/api/health-check.sh /usr/local/bin/wikijump-health-check +COPY ./install/local/api/deepwell.toml /etc/deepwell.toml +COPY ./install/local/api/deepwell-start /usr/local/bin/wikijump-deepwell-start +COPY ./install/local/api/health-check.sh /usr/local/bin/wikijump-health-check # /opt/locales is provided via docker-compose.dev.yaml diff --git a/install/files/local/deepwell-start b/install/local/api/deepwell-start similarity index 100% rename from install/files/local/deepwell-start rename to install/local/api/deepwell-start diff --git a/install/files/local/deepwell.toml b/install/local/api/deepwell.toml similarity index 100% rename from install/files/local/deepwell.toml rename to install/local/api/deepwell.toml diff --git a/install/local/api/health-check.sh b/install/local/api/health-check.sh new file mode 120000 index 0000000000..03329b7bcb --- /dev/null +++ b/install/local/api/health-check.sh @@ -0,0 +1 @@ +../../common/api/health-check.sh \ No newline at end of file diff --git a/install/local/nginx/Dockerfile b/install/local/nginx/Dockerfile index 59b2b06401..e6209cea42 100644 --- a/install/local/nginx/Dockerfile +++ b/install/local/nginx/Dockerfile @@ -21,12 +21,12 @@ RUN openssl req \ -addext "subjectAltName=DNS:localhost,DNS:*.localhost" # Copy configuration files -COPY ./install/files/nginx/nginx.conf /etc/nginx/nginx.conf -COPY ./install/files/nginx/proxy.conf /etc/nginx/proxy.conf -COPY ./install/files/nginx/gzip.conf /etc/nginx/gzip.conf -COPY ./install/files/nginx/ffdhe2048.txt /etc/nginx/ffdhe2048.txt -COPY ./install/files/local/ssl.conf /etc/nginx/ssl.conf -COPY ./install/files/local/web.conf /etc/nginx/web.conf +COPY ./install/local/nginx/nginx.conf /etc/nginx/nginx.conf +COPY ./install/local/nginx/proxy.conf /etc/nginx/proxy.conf +COPY ./install/local/nginx/gzip.conf /etc/nginx/gzip.conf +COPY ./install/local/nginx/ffdhe2048.txt /etc/nginx/ffdhe2048.txt +COPY ./install/local/nginx/ssl.conf /etc/nginx/ssl.conf +COPY ./install/local/nginx/web.conf /etc/nginx/web.conf # Verify configuration RUN nginx -t diff --git a/install/files/nginx/ffdhe2048.txt b/install/local/nginx/ffdhe2048.txt similarity index 100% rename from install/files/nginx/ffdhe2048.txt rename to install/local/nginx/ffdhe2048.txt diff --git a/install/files/nginx/gzip.conf b/install/local/nginx/gzip.conf similarity index 100% rename from install/files/nginx/gzip.conf rename to install/local/nginx/gzip.conf diff --git a/install/files/nginx/nginx.conf b/install/local/nginx/nginx.conf similarity index 100% rename from install/files/nginx/nginx.conf rename to install/local/nginx/nginx.conf diff --git a/install/files/nginx/proxy.conf b/install/local/nginx/proxy.conf similarity index 100% rename from install/files/nginx/proxy.conf rename to install/local/nginx/proxy.conf diff --git a/install/files/local/ssl.conf b/install/local/nginx/ssl.conf similarity index 100% rename from install/files/local/ssl.conf rename to install/local/nginx/ssl.conf diff --git a/install/files/local/web.conf b/install/local/nginx/web.conf similarity index 100% rename from install/files/local/web.conf rename to install/local/nginx/web.conf diff --git a/install/local/postgres/Dockerfile b/install/local/postgres/Dockerfile index 49020aee5b..30a1081fb8 100644 --- a/install/local/postgres/Dockerfile +++ b/install/local/postgres/Dockerfile @@ -16,5 +16,5 @@ RUN apk add --no-cache \ sudo # Install files -COPY ./install/files/postgres/init /docker-entrypoint-initdb.d -COPY ./install/files/postgres/health-check.sh /bin/wikijump-health-check +COPY ./install/local/postgres/init /docker-entrypoint-initdb.d +COPY ./install/local/postgres/health-check.sh /bin/wikijump-health-check diff --git a/install/prod/api/Dockerfile b/install/prod/api/Dockerfile index dbc4ea8a1b..def16949f4 100644 --- a/install/prod/api/Dockerfile +++ b/install/prod/api/Dockerfile @@ -30,8 +30,8 @@ ENV LOCALIZATION_PATH="/opt/locales" RUN apt update RUN apt install -y curl libmagic1 libmagic-mgc COPY --from=rust /src/deepwell/target/release/deepwell /usr/local/bin/deepwell -COPY ./install/files/api/health-check.sh /bin/wikijump-health-check -COPY ./install/files/prod/deepwell.toml /etc/deepwell.toml +COPY ./install/prod/api/health-check.sh /bin/wikijump-health-check +COPY ./install/prod/api/deepwell.toml /etc/deepwell.toml COPY ./locales/fluent /opt/locales/fluent USER daemon diff --git a/install/files/prod/deepwell.toml b/install/prod/api/deepwell.toml similarity index 100% rename from install/files/prod/deepwell.toml rename to install/prod/api/deepwell.toml diff --git a/install/prod/api/health-check.sh b/install/prod/api/health-check.sh new file mode 120000 index 0000000000..03329b7bcb --- /dev/null +++ b/install/prod/api/health-check.sh @@ -0,0 +1 @@ +../../common/api/health-check.sh \ No newline at end of file diff --git a/install/prod/postgres/Dockerfile b/install/prod/postgres/Dockerfile index 3cfa487e17..38f1492786 100644 --- a/install/prod/postgres/Dockerfile +++ b/install/prod/postgres/Dockerfile @@ -16,5 +16,5 @@ RUN apk add --no-cache \ sudo # Install files -COPY ./install/files/postgres/init /docker-entrypoint-initdb.d -COPY ./install/files/postgres/health-check.sh /bin/wikijump-health-check +COPY ./install/prod/postgres/init /docker-entrypoint-initdb.d +COPY ./install/prod/postgres/health-check.sh /bin/wikijump-health-check From f27e61893e1a0bc2748a9fb997acb5d09b65fbcd Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 15:39:04 -0500 Subject: [PATCH 03/15] Fix local install paths in legacy directory. --- web/nabs.yml | 4 ++-- web/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/nabs.yml b/web/nabs.yml index 140dcdc27e..5019ea5982 100644 --- a/web/nabs.yml +++ b/web/nabs.yml @@ -83,10 +83,10 @@ build-container: # $ pnpm compose up # $ pnpm compose build compose: - - cd ../install/local/dev + - cd ../install/local - cross-env DOCKER_BUILDKIT=1 docker-compose -p wikijump -f docker-compose.yaml -f docker-compose.dev.yaml # Like compose, but invokes docker with sudo compose-sudo: - - cd ../install/local/dev + - cd ../install/local - cross-env DOCKER_BUILDKIT=1 sudo -E docker-compose -p wikijump -f docker-compose.yaml -f docker-compose.dev.yaml diff --git a/web/package.json b/web/package.json index 6db06f2466..7f06487c23 100644 --- a/web/package.json +++ b/web/package.json @@ -5,8 +5,8 @@ "scripts": { "build-container": "vite build && cd web && pnpm -s build", "changeset": "changeset", - "compose": "cd ../install/local/dev && cross-env DOCKER_BUILDKIT=1 docker-compose -p wikijump -f docker-compose.yaml -f docker-compose.dev.yaml", - "compose-sudo": "cd ../install/local/dev && cross-env DOCKER_BUILDKIT=1 sudo -E docker-compose -p wikijump -f docker-compose.yaml -f docker-compose.dev.yaml", + "compose": "cd ../install/local && cross-env DOCKER_BUILDKIT=1 docker-compose -p wikijump -f docker-compose.yaml -f docker-compose.dev.yaml", + "compose-sudo": "cd ../install/local && cross-env DOCKER_BUILDKIT=1 sudo -E docker-compose -p wikijump -f docker-compose.yaml -f docker-compose.dev.yaml", "cover": "vitest --coverage --run", "dev": "esr scripts/dev.js", "lint": "run-p -lns lint:eslint lint:stylelint lint:prettier", From 458e8baf2b9852ab976149cf88634a13c57d9a0f Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 15:40:19 -0500 Subject: [PATCH 04/15] Adjust install paths in docker-compose files. --- install/local/docker-compose.dev.yaml | 2 +- install/local/docker-compose.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install/local/docker-compose.dev.yaml b/install/local/docker-compose.dev.yaml index 823037e648..2080f7e700 100644 --- a/install/local/docker-compose.dev.yaml +++ b/install/local/docker-compose.dev.yaml @@ -25,7 +25,7 @@ services: read_only: true # Configuration data - type: bind - source: ../../../install/files/local/deepwell.toml + source: ../../../install/local/api/deepwell.toml target: /etc/deepwell.toml # Translation data - type: bind diff --git a/install/local/docker-compose.yaml b/install/local/docker-compose.yaml index 4336aa174e..73e9bf8bff 100644 --- a/install/local/docker-compose.yaml +++ b/install/local/docker-compose.yaml @@ -2,7 +2,7 @@ services: database: build: context: ../../.. - dockerfile: install/local/dev/postgres/Dockerfile + dockerfile: install/local/postgres/Dockerfile environment: - "POSTGRES_DB=wikijump" - "POSTGRES_USER=wikijump" @@ -51,7 +51,7 @@ services: api: build: context: ../../.. - dockerfile: install/local/dev/api/Dockerfile + dockerfile: install/local/api/Dockerfile ports: - "2747:2747" links: @@ -84,7 +84,7 @@ services: web: build: context: ../../.. - dockerfile: install/local/dev/web/Dockerfile + dockerfile: install/local/web/Dockerfile ports: - "3000:3000" links: @@ -101,7 +101,7 @@ services: nginx: build: context: ../../.. - dockerfile: install/local/dev/nginx/Dockerfile + dockerfile: install/local/nginx/Dockerfile ports: - "80:80" - "443:443" From c35d7e21d9f7172aad5d4b31fca2547a11a17b08 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 15:42:03 -0500 Subject: [PATCH 05/15] Update install/local directory in docs/development.md --- docs/development.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/development.md b/docs/development.md index 152c7ca453..68c1b3ad94 100644 --- a/docs/development.md +++ b/docs/development.md @@ -47,7 +47,7 @@ Node, NPM, and PNPM are well-behaved on Windows and Linux, and the difference in There are a couple of configuration files that need to be initialized prior to running your instance of Wikijump. These will be the `config.toml` and `.env` files, both located in the `deepwell` subdirectory. For a typical local deploy, both of these files can be copied from their `.example` counterparts without changing them, though it is worth looking through them briefly to understand what can be configurated for your instance. -There is also a Docker configuration file that configures the various containers that host Wikijump in the local environment. You can find this file in `install/local/dev/`, named `docker-compose.yaml`, alongside `docker-compose.dev.yaml` (which provides various helpful tools for developing locally). +There is also a Docker configuration file that configures the various containers that host Wikijump in the local environment. You can find this file in `install/local`, named `docker-compose.yaml`, alongside `docker-compose.dev.yaml` (which provides various helpful tools for developing locally). Notice that in `docker-compose.yaml`, there are configuration options for the domains to use. For development purposes, these are set to `wikijump.localhost`. This is the domain you will be connecting to, e.g. `https://www.wikijump.localhost`. The TLD `.localhost` is just like the usual `localhost` domain. Even when running locally, HTTPS is used. Because this certificate is self-signed, you will need to dismiss the certificate warning. @@ -61,13 +61,13 @@ $ pnpm install ## Building -You can now finally build the Docker images. Navigate to `install/local/dev` and run the following: +You can now finally build the Docker images. Navigate to `install/local` and run the following: ```sh $ docker-compose -p wikijump -f docker-compose.yaml -f docker-compose.dev.yaml up ``` -_This might take some time_. Thankfully, Docker's build step is _heavily_ cached. +_This might take some time_. Thankfully, Docker's build step is heavily cached. You will generally not need to rerun this build often. > ### For Windows: > @@ -114,4 +114,4 @@ you can enter this command to sync your time up: ``` $ ntpd -d -q -n -p 0.pool.ntp.org -``` \ No newline at end of file +``` From 1da766d2f121aa88aa49ccfaa98d28faac960855 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 16:54:36 -0500 Subject: [PATCH 06/15] Create deploy.py convenience script for local. --- install/local/deploy.py | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 install/local/deploy.py diff --git a/install/local/deploy.py b/install/local/deploy.py new file mode 100755 index 0000000000..80c4d56cf7 --- /dev/null +++ b/install/local/deploy.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 + +import argparse +import os + + +def chdir_wikijump(): + # Determine where this script is + full_path = __file__ + if not os.path.abspath(full_path): + full_path = os.path.join(os.getcwd(), full_path) + + # The directory it's located in should be install/local/ + # So we should change to that + install_local_dir = os.path.dirname(full_path) + os.chdir(install_local_dir) + + +if __name__ == "__main__": + # Parse arguments + argparser = argparse.ArgumentParser() + argparser.add_argument("-S", "--sudo", action="store_true", help="Runs the docker-compose command using sudo") + argparser.add_argument("-d", "--no-dev", action="store_true", help="Do not use the docker-compose.dev.yaml convenience bindings") + argparser.add_argument("-x", "--no-chdir", action="store_true", help="Do not change directory before attempting to run docker-compose") + argparser.add_argument("action", nargs=argparse.REMAINDER) + args = argparser.parse_args() + + # Get into the right context + if not args.no_chdir: + chdir_wikijump() + + # Build command-line argument list + cmdline = [ + "docker-compose", + "-p", + "wikijump", + "-f", + "docker-compose.yaml", + ] + + if args.sudo: + cmdline.insert(0, "sudo") + + if not args.no_dev: + cmdline.extend(("-f", "docker-compose.dev.yaml")) + + cmdline.extend(args.action) + + # We use exec instead of subprocess since this is just a launch script, + # it doesn't need to do any work after starting docker-compose. + print(" ".join(cmdline)}) + os.execvp(cmdline[0], cmdline) From 8e692557afdbd10a4f92a574c9b7e730ab6d7871 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 16:59:57 -0500 Subject: [PATCH 07/15] Modify docs/development.md for new script. --- docs/development.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/development.md b/docs/development.md index 68c1b3ad94..1d5b2f75d0 100644 --- a/docs/development.md +++ b/docs/development.md @@ -61,10 +61,27 @@ $ pnpm install ## Building -You can now finally build the Docker images. Navigate to `install/local` and run the following: +You can now start up the Docker images. The basic command used to run Wikijump locally is: ```sh -$ docker-compose -p wikijump -f docker-compose.yaml -f docker-compose.dev.yaml up +$ [sudo] docker-compose -p wikijump -f docker-compose.yaml [-f docker-compose.dev.yaml] +``` + +* On some systems, `sudo` is required to run Docker, but on others it is not. +* The `-f docker-compose.dev.yaml` configuration file provides container bindings for development. In other words, if you modify `deepwell/src/` files locally, then those changes will be reflected in the container. + +The `install/local/deploy.py` script is meant as a convenience here. You can pass in `--sudo` or `--no-dev` to make either of the above modifications for you. + +The "action" corresponds to actions that `docker-compose` can do. Some common commands are: +* `up` — Create and start containers for Wikijump. +* `up --build` — Like the above but it first builds new images before creating containers. +* `start` — Start any already-existing containers for Wikijump. +* `stop` — Stop currently-running containers for Wikijump. + +To start the project, you want to run a command that probably looks something like: + +``` +$ install/local/deploy.py up ``` _This might take some time_. Thankfully, Docker's build step is heavily cached. You will generally not need to rerun this build often. From fb6025cf8e4a3d2b2c39ca9fce5d4bb96a5b0ded Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 17:00:21 -0500 Subject: [PATCH 08/15] Run black formatter on deploy.py --- install/local/deploy.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/install/local/deploy.py b/install/local/deploy.py index 80c4d56cf7..4fed1c3516 100755 --- a/install/local/deploy.py +++ b/install/local/deploy.py @@ -19,9 +19,24 @@ def chdir_wikijump(): if __name__ == "__main__": # Parse arguments argparser = argparse.ArgumentParser() - argparser.add_argument("-S", "--sudo", action="store_true", help="Runs the docker-compose command using sudo") - argparser.add_argument("-d", "--no-dev", action="store_true", help="Do not use the docker-compose.dev.yaml convenience bindings") - argparser.add_argument("-x", "--no-chdir", action="store_true", help="Do not change directory before attempting to run docker-compose") + argparser.add_argument( + "-S", + "--sudo", + action="store_true", + help="Runs the docker-compose command using sudo", + ) + argparser.add_argument( + "-d", + "--no-dev", + action="store_true", + help="Do not use the docker-compose.dev.yaml convenience bindings", + ) + argparser.add_argument( + "-x", + "--no-chdir", + action="store_true", + help="Do not change directory before attempting to run docker-compose", + ) argparser.add_argument("action", nargs=argparse.REMAINDER) args = argparser.parse_args() @@ -48,5 +63,5 @@ def chdir_wikijump(): # We use exec instead of subprocess since this is just a launch script, # it doesn't need to do any work after starting docker-compose. - print(" ".join(cmdline)}) + print(" ".join(cmdline)) os.execvp(cmdline[0], cmdline) From 2dbb6eabcb88559cf819e411b82ee5428ff326a0 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 17:14:09 -0500 Subject: [PATCH 09/15] Update install/ paths in GitHub workflow files. --- .github/workflows/deepwell.yaml | 9 ++++----- .github/workflows/docker-build-api.dev.yaml | 4 ++-- .github/workflows/docker-build-api.local.yaml | 4 ++-- .github/workflows/docker-build-api.prod.yaml | 4 ++-- .github/workflows/docker-build-minio.local.yaml | 4 ++-- .github/workflows/docker-build-postgres.local.yaml | 6 +++--- .github/workflows/docker-build-postgres.prod.yaml | 6 +++--- .github/workflows/docker-build-redis.local.yaml | 4 ++-- .github/workflows/docker-build-web.dev.yaml | 4 ++-- .github/workflows/docker-build-web.local.yaml | 4 ++-- .github/workflows/docker-build-web.prod.yaml | 4 ++-- 11 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.github/workflows/deepwell.yaml b/.github/workflows/deepwell.yaml index 95cbafda90..ea1330a37b 100644 --- a/.github/workflows/deepwell.yaml +++ b/.github/workflows/deepwell.yaml @@ -9,10 +9,9 @@ on: - '.github/workflows/deepwell.yaml' - '.github/codecov.yml' - 'deepwell/config.example.toml' - - 'install/files/local/deepwell.toml' - # TODO: add install/files/dev/deepwell.toml - # and install/files/prod/deepwell.toml - # both here and below + - 'install/local/api/deepwell.toml' + - 'install/dev/api/deepwell.toml' + - 'install/prod/api/deepwell.toml' push: branches: - develop @@ -52,7 +51,7 @@ jobs: run: cd deepwell && cargo build --all-features - name: Check Configuration - run: cd deepwell && cargo run -- config.example.toml ../install/files/local/deepwell.toml + run: cd deepwell && cargo run -- config.example.toml ../install/local/api/deepwell.toml ../install/dev/api/deepwell.toml ../prod/api/deepwell.toml env: DEEPWELL_SPECIAL_ACTION: validate-config diff --git a/.github/workflows/docker-build-api.dev.yaml b/.github/workflows/docker-build-api.dev.yaml index 035a0d814f..5c8e268ebd 100644 --- a/.github/workflows/docker-build-api.dev.yaml +++ b/.github/workflows/docker-build-api.dev.yaml @@ -4,7 +4,7 @@ on: pull_request: paths: - 'deepwell/**' - - 'install/dev/digitalocean/api/Dockerfile' + - 'install/dev/api/Dockerfile' - '.github/workflows/docker-build-api.dev.yaml' jobs: @@ -15,6 +15,6 @@ jobs: uses: actions/checkout@v2 - name: Build image - run: docker build -f install/dev/digitalocean/api/Dockerfile . + run: docker build -f install/dev/api/Dockerfile . env: DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/docker-build-api.local.yaml b/.github/workflows/docker-build-api.local.yaml index c0597a817a..5afb5472ef 100644 --- a/.github/workflows/docker-build-api.local.yaml +++ b/.github/workflows/docker-build-api.local.yaml @@ -4,7 +4,7 @@ on: pull_request: paths: - 'deepwell/**' - - 'install/local/dev/api/Dockerfile' + - 'install/local/api/Dockerfile' - '.github/workflows/docker-build-api.local.yaml' jobs: @@ -15,6 +15,6 @@ jobs: uses: actions/checkout@v2 - name: Build image - run: docker build -f install/local/dev/api/Dockerfile . + run: docker build -f install/local/api/Dockerfile . env: DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/docker-build-api.prod.yaml b/.github/workflows/docker-build-api.prod.yaml index 855b52d8f0..b9a7334522 100644 --- a/.github/workflows/docker-build-api.prod.yaml +++ b/.github/workflows/docker-build-api.prod.yaml @@ -4,7 +4,7 @@ on: pull_request: paths: - 'deepwell/**' - - 'install/aws/prod/docker/api/Dockerfile' + - 'install/prod/api/Dockerfile' - '.github/workflows/docker-build-api.prod.yaml' jobs: @@ -15,6 +15,6 @@ jobs: uses: actions/checkout@v2 - name: Build image - run: docker build -f install/aws/prod/docker/api/Dockerfile . + run: docker build -f install/prod/api/Dockerfile . env: DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/docker-build-minio.local.yaml b/.github/workflows/docker-build-minio.local.yaml index 7d13bc1fe5..52bfc74b4e 100644 --- a/.github/workflows/docker-build-minio.local.yaml +++ b/.github/workflows/docker-build-minio.local.yaml @@ -3,7 +3,7 @@ name: '[backend] Docker build Minio (local)' on: pull_request: paths: - - 'install/local/dev/minio/*' + - 'install/local/minio/*' - '.github/workflows/docker-build-minio.local.yaml' jobs: @@ -14,6 +14,6 @@ jobs: uses: actions/checkout@v2 - name: Build image - run: cd install/local/dev/minio && docker build . + run: cd install/local/minio && docker build . env: DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/docker-build-postgres.local.yaml b/.github/workflows/docker-build-postgres.local.yaml index 14a2aa98e3..953d906c1e 100644 --- a/.github/workflows/docker-build-postgres.local.yaml +++ b/.github/workflows/docker-build-postgres.local.yaml @@ -4,8 +4,8 @@ on: pull_request: paths: - 'web/database/**' - - 'install/files/postgres/**' - - 'install/local/dev/postgres/Dockerfile' + - 'install/common/postgres/**' + - 'install/local/postgres/Dockerfile' - '.github/workflows/docker-build-postgres.local.yaml' jobs: @@ -16,6 +16,6 @@ jobs: uses: actions/checkout@v2 - name: Build image - run: docker build -f install/local/dev/postgres/Dockerfile . + run: docker build -f install/local/postgres/Dockerfile . env: DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/docker-build-postgres.prod.yaml b/.github/workflows/docker-build-postgres.prod.yaml index 86ef2bc6b5..98b1682785 100644 --- a/.github/workflows/docker-build-postgres.prod.yaml +++ b/.github/workflows/docker-build-postgres.prod.yaml @@ -4,8 +4,8 @@ on: pull_request: paths: - 'web/database/**' - - 'install/files/postgres/**' - - 'install/aws/prod/docker/postgres/Dockerfile' + - 'install/common/postgres/**' + - 'install/prod/postgres/Dockerfile' - '.github/workflows/docker-build-postgres.prod.yaml' jobs: @@ -16,6 +16,6 @@ jobs: uses: actions/checkout@v2 - name: Build image - run: docker build -f install/aws/prod/docker/postgres/Dockerfile . + run: docker build -f install/prod/postgres/Dockerfile . env: DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/docker-build-redis.local.yaml b/.github/workflows/docker-build-redis.local.yaml index 21434ee89f..c5ce068bb5 100644 --- a/.github/workflows/docker-build-redis.local.yaml +++ b/.github/workflows/docker-build-redis.local.yaml @@ -3,7 +3,7 @@ name: '[backend] Docker build Redis (local)' on: pull_request: paths: - - 'install/local/dev/redis/*' + - 'install/local/redis/*' - '.github/workflows/docker-build-redis.local.yaml' jobs: @@ -14,6 +14,6 @@ jobs: uses: actions/checkout@v2 - name: Build image - run: cd install/local/dev/redis && docker build . + run: cd install/local/redis && docker build . env: DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/docker-build-web.dev.yaml b/.github/workflows/docker-build-web.dev.yaml index 7f468490a3..02e10ac9e3 100644 --- a/.github/workflows/docker-build-web.dev.yaml +++ b/.github/workflows/docker-build-web.dev.yaml @@ -4,7 +4,7 @@ on: pull_request: paths: - 'framerail/**' - - 'install/dev/digitalocean/web/Dockerfile' + - 'install/dev/web/Dockerfile' - '.github/workflows/docker-build-web.dev.yaml' jobs: @@ -15,6 +15,6 @@ jobs: uses: actions/checkout@v2 - name: Build image - run: docker build -f install/dev/digitalocean/web/Dockerfile . + run: docker build -f install/dev/web/Dockerfile . env: DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/docker-build-web.local.yaml b/.github/workflows/docker-build-web.local.yaml index 46a9a70c9c..898e3314bc 100644 --- a/.github/workflows/docker-build-web.local.yaml +++ b/.github/workflows/docker-build-web.local.yaml @@ -4,7 +4,7 @@ on: pull_request: paths: - 'framerail/**' - - 'install/local/dev/web/Dockerfile' + - 'install/local/web/Dockerfile' - '.github/workflows/docker-build-web.local.yaml' jobs: @@ -15,6 +15,6 @@ jobs: uses: actions/checkout@v2 - name: Build image - run: docker build -f install/local/dev/web/Dockerfile . + run: docker build -f install/local/web/Dockerfile . env: DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/docker-build-web.prod.yaml b/.github/workflows/docker-build-web.prod.yaml index fe6067a632..3c8c3b6c11 100644 --- a/.github/workflows/docker-build-web.prod.yaml +++ b/.github/workflows/docker-build-web.prod.yaml @@ -4,7 +4,7 @@ on: pull_request: paths: - 'framerail/**' - - 'install/aws/prod/docker/web/Dockerfile' + - 'install/prod/web/Dockerfile' - '.github/workflows/docker-build-web.prod.yaml' jobs: @@ -15,6 +15,6 @@ jobs: uses: actions/checkout@v2 - name: Build image - run: docker build -f install/aws/prod/docker/web/Dockerfile . + run: docker build -f install/prod/web/Dockerfile . env: DOCKER_BUILDKIT: 1 From 91defd4d820ff001cc6921972cc2a08d99364ec1 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 17:14:30 -0500 Subject: [PATCH 10/15] Update install/ paths in DigitalOcean config. --- .do/app.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.do/app.yaml b/.do/app.yaml index da5cbe2e65..eac5365a5e 100644 --- a/.do/app.yaml +++ b/.do/app.yaml @@ -19,7 +19,7 @@ domains: services: - name: framerail source_dir: . - dockerfile_path: install/dev/digitalocean/web/Dockerfile + dockerfile_path: install/dev/web/Dockerfile github: repo: scpwiki/wikijump branch: develop @@ -34,7 +34,7 @@ services: - name: deepwell source_dir: . - dockerfile_path: install/dev/digitalocean/api/Dockerfile + dockerfile_path: install/dev/api/Dockerfile github: repo: scpwiki/wikijump branch: develop From 9d2ccf4f62a75d2c43bbe128afedf76ded1d549f Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 17:27:39 -0500 Subject: [PATCH 11/15] Add symlinks for Postgres Dockerfile. --- install/local/postgres/health-check.sh | 1 + install/local/postgres/init | 1 + install/prod/postgres/health-check.sh | 1 + install/prod/postgres/init | 1 + 4 files changed, 4 insertions(+) create mode 120000 install/local/postgres/health-check.sh create mode 120000 install/local/postgres/init create mode 120000 install/prod/postgres/health-check.sh create mode 120000 install/prod/postgres/init diff --git a/install/local/postgres/health-check.sh b/install/local/postgres/health-check.sh new file mode 120000 index 0000000000..5103532bce --- /dev/null +++ b/install/local/postgres/health-check.sh @@ -0,0 +1 @@ +../../common/postgres/health-check.sh \ No newline at end of file diff --git a/install/local/postgres/init b/install/local/postgres/init new file mode 120000 index 0000000000..43efa9d978 --- /dev/null +++ b/install/local/postgres/init @@ -0,0 +1 @@ +../../common/postgres/init \ No newline at end of file diff --git a/install/prod/postgres/health-check.sh b/install/prod/postgres/health-check.sh new file mode 120000 index 0000000000..5103532bce --- /dev/null +++ b/install/prod/postgres/health-check.sh @@ -0,0 +1 @@ +../../common/postgres/health-check.sh \ No newline at end of file diff --git a/install/prod/postgres/init b/install/prod/postgres/init new file mode 120000 index 0000000000..43efa9d978 --- /dev/null +++ b/install/prod/postgres/init @@ -0,0 +1 @@ +../../common/postgres/init \ No newline at end of file From 47e795a0437a43037b710d7d9ee814bce682d917 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 17:29:27 -0500 Subject: [PATCH 12/15] Change message for config check result. --- deepwell/src/config/special_action.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepwell/src/config/special_action.rs b/deepwell/src/config/special_action.rs index 4058315e40..268328fb93 100644 --- a/deepwell/src/config/special_action.rs +++ b/deepwell/src/config/special_action.rs @@ -66,6 +66,6 @@ fn validate_config() -> i32 { } } - println!("All passed files checked, exiting"); + println!("All config files have been checked, {return_code} failed"); return_code } From 1953da165b6d6e7ca117fb2629612f77262bc777 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 17:30:22 -0500 Subject: [PATCH 13/15] Fix config path in workflow. --- .github/workflows/deepwell.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deepwell.yaml b/.github/workflows/deepwell.yaml index ea1330a37b..376e23bc94 100644 --- a/.github/workflows/deepwell.yaml +++ b/.github/workflows/deepwell.yaml @@ -51,7 +51,7 @@ jobs: run: cd deepwell && cargo build --all-features - name: Check Configuration - run: cd deepwell && cargo run -- config.example.toml ../install/local/api/deepwell.toml ../install/dev/api/deepwell.toml ../prod/api/deepwell.toml + run: cd deepwell && cargo run -- config.example.toml ../install/local/api/deepwell.toml ../install/dev/api/deepwell.toml ../install/prod/api/deepwell.toml env: DEEPWELL_SPECIAL_ACTION: validate-config From e1d4865d335e4485e180016e7e5a0ef7434c04ab Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Dec 2024 23:53:57 -0500 Subject: [PATCH 14/15] Fix context directories. --- install/local/docker-compose.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/local/docker-compose.yaml b/install/local/docker-compose.yaml index 73e9bf8bff..5e7aa38e8d 100644 --- a/install/local/docker-compose.yaml +++ b/install/local/docker-compose.yaml @@ -1,7 +1,7 @@ services: database: build: - context: ../../.. + context: ../.. dockerfile: install/local/postgres/Dockerfile environment: - "POSTGRES_DB=wikijump" @@ -50,7 +50,7 @@ services: api: build: - context: ../../.. + context: ../.. dockerfile: install/local/api/Dockerfile ports: - "2747:2747" @@ -83,7 +83,7 @@ services: web: build: - context: ../../.. + context: ../.. dockerfile: install/local/web/Dockerfile ports: - "3000:3000" @@ -100,7 +100,7 @@ services: nginx: build: - context: ../../.. + context: ../.. dockerfile: install/local/nginx/Dockerfile ports: - "80:80" From 6eb637e2832a40c43fff746bf73fc902f6e0778b Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Mon, 2 Dec 2024 00:43:34 -0500 Subject: [PATCH 15/15] Fix bind mount paths. --- install/local/docker-compose.dev.yaml | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/install/local/docker-compose.dev.yaml b/install/local/docker-compose.dev.yaml index 2080f7e700..671ba16ef6 100644 --- a/install/local/docker-compose.dev.yaml +++ b/install/local/docker-compose.dev.yaml @@ -3,64 +3,64 @@ services: volumes: # Rust sources - type: bind - source: ../../../deepwell/src + source: ../../deepwell/src target: /src/deepwell/src read_only: true - type: bind - source: ../../../deepwell/build.rs + source: ../../deepwell/build.rs target: /src/deepwell/build.rs read_only: true - type: bind - source: ../../../deepwell/Cargo.toml + source: ../../deepwell/Cargo.toml target: /src/deepwell/Cargo.toml read_only: true # Database files - type: bind - source: ../../../deepwell/migrations + source: ../../deepwell/migrations target: /src/deepwell/migrations read_only: true - type: bind - source: ../../../deepwell/seeder + source: ../../deepwell/seeder target: /src/deepwell/seeder read_only: true # Configuration data - type: bind - source: ../../../install/local/api/deepwell.toml + source: ../../install/local/api/deepwell.toml target: /etc/deepwell.toml # Translation data - type: bind - source: ../../../locales + source: ../../locales target: /opt/locales read_only: true web: volumes: # Typescript/Svelte files - type: bind - source: ../../../framerail/src + source: ../../framerail/src target: /app/src read_only: true - type: bind - source: ../../../framerail/static + source: ../../framerail/static target: /app/static read_only: true - type: bind - source: ../../../framerail/package.json + source: ../../framerail/package.json target: /app/package.json read_only: true - type: bind - source: ../../../framerail/pnpm-lock.yaml + source: ../../framerail/pnpm-lock.yaml target: /app/pnpm-lock.yaml read_only: true - type: bind - source: ../../../framerail/svelte.config.js + source: ../../framerail/svelte.config.js target: /app/svelte.config.js read_only: true - type: bind - source: ../../../framerail/vite.config.ts + source: ../../framerail/vite.config.ts target: /app/vite.config.ts read_only: true # Assets - type: bind - source: ../../../assets + source: ../../assets target: /app/src/assets read_only: true