Set up the following environment variables in the .env.{mode}
file by default it is .env.development
:
VITE_FIREBASE_API_KEY=
VITE_FIREBASE_AUTH_DOMAIN=
VITE_FIREBASE_DATABASE_URL=
VITE_FIREBASE_PROJECT_ID=
VITE_FIREBASE_STORAGE_BUCKET=
VITE_FIREBASE_MESSAGING_SENDER_ID=
VITE_FIREBASE_APP_ID=
And there are two ways to deploy your web application using Docker.
With Remote Container, you can use a Docker container as your development environment without the need for a complicated set-up. Here's how to set it up:
- Make sure Docker and Visual Studio Code Dev Containers extension are installed.
- Open the project folder in VS Code and the remote container dialog will pop up in the bottom right corner.
- Select to open the project folder with Remote Container.
- The container will install and build the necessary environment.
- You should then see the application running at [http://localhost:5173/]. If not, follow the steps below:
- Press F5 for debug (Task: npm run dev).
> Note: You can ignore the "no debugger installed" alert after exiting debugging.
-
Launch the container by running the following command under your project folder:
docker run -it -p 5173:5173 --rm -v $PWD:/app node:18-bullseye sh
-
Install the necessary libraries and run the application:
$ cd ./app $ npm install $ npm run dev