diff --git a/frontend/README.md b/frontend/README.md index 61e68d9..4062b95 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -7,11 +7,12 @@ Run `yarn install` and `yarn dev` in this directory to launch the react project To run on windows, use docker. 1. Set VITE_DOCKER to true in .env -2. Run `docker-compose up --build --no-recreate -d` in this directory to create the container. -3. Run `docker exec -it vite_docker sh` to log into the container. -4. Run `corepack enable` to use the latest version of yarn. -5. Make sure that yarn is set to version 4.5 with `yarn -v`, and run `yarn set version stable` if it isn't. -6. Run `yarn` and `yarn dev` to launch the react project in your browser. +2. Run `docker compose up -d` +3. Navigate to http://localhost:8000/ + +Note: If you change your environment variables in .env, you will have to rebuild the container to see the changes using the `docker compose up --build -d` command. + +To see the logs directly in your console, you can remove the -d flag. Otherwise, you can view output in Docker Desktop. ## Update locale files diff --git a/frontend/docker-compose.yml b/frontend/docker-compose.yml index 3ee05da..c61faae 100644 --- a/frontend/docker-compose.yml +++ b/frontend/docker-compose.yml @@ -5,7 +5,7 @@ services: container_name: vite_docker env_file: - .env - entrypoint: /bin/sh + entrypoint: /srv/app/entrypoint.sh ports: - 8000:8000 working_dir: /srv/app diff --git a/frontend/entrypoint.sh b/frontend/entrypoint.sh new file mode 100644 index 0000000..ad61ba3 --- /dev/null +++ b/frontend/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +corepack enable +yarn install +yarn dev