Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve docker setup #25

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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