mirror of
https://github.com/logos-messaging/logos-messaging-frontend.git
synced 2026-01-02 13:53:13 +00:00
Dockerize waku-frontend
This commit is contained in:
parent
a2b77b369d
commit
891c5be53f
31
Dockerfile
31
Dockerfile
@ -1,4 +1,27 @@
|
||||
FROM httpd:2.4
|
||||
RUN mkdir -p /usr/local/apache2/htdocs/_next
|
||||
COPY out/* /usr/local/apache2/htdocs/
|
||||
COPY out/_next /usr/local/apache2/htdocs/_next
|
||||
# Use an official Node.js runtime as a parent image
|
||||
FROM node:18-alpine
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Copy the rest of the application code
|
||||
COPY . .
|
||||
|
||||
# Install Vite globally (optional if not using npx or npm run dev directly)
|
||||
RUN npm install -g vite
|
||||
|
||||
# Expose the port Vite runs on
|
||||
EXPOSE 5173
|
||||
|
||||
# Ensure node_modules/.bin is in the PATH
|
||||
ENV PATH /app/node_modules/.bin:$PATH
|
||||
|
||||
# Run the Vite development server
|
||||
CMD ["npm", "run", "dev"]
|
||||
|
||||
|
||||
10
README.md
10
README.md
@ -28,12 +28,22 @@ The public chat room is open to everyone who knows the community name. The conte
|
||||
|
||||
## Development
|
||||
|
||||
### Locally
|
||||
```shell
|
||||
npm install
|
||||
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Docker
|
||||
|
||||
```
|
||||
docker build -t waku-frontend .
|
||||
docker run -p 5173:5173 waku-frontend
|
||||
```
|
||||
|
||||
And go to `http://localhost:5173`.
|
||||
|
||||
## Caddy configuration
|
||||
|
||||
```
|
||||
|
||||
@ -4,6 +4,10 @@ import react from '@vitejs/plugin-react'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
port: 5173,
|
||||
},
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user