Skip to content

Commit

Permalink
chore: improve docker setup
Browse files Browse the repository at this point in the history
  • Loading branch information
KarmineSH committed Oct 7, 2024
1 parent 893a4d7 commit 5f5351d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
11 changes: 6 additions & 5 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion frontend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions frontend/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

corepack enable
yarn install
yarn dev

0 comments on commit 5f5351d

Please sign in to comment.