Browse Source

feat: support backward compability

This commit introduces a .dockerignore file to exclude unnecessary files from the Docker build context. Additionally, the Dockerfile is updated to set the default command to "rest" when the container starts, ensuring proper execution of the application.
pull/301/head v6.0.1
Aldino Kemal 10 months ago
parent
commit
20d027c12a
  1. 10
      .dockerignore
  2. 4
      docker/golang.Dockerfile
  3. 5
      readme.md

10
.dockerignore

@ -0,0 +1,10 @@
.idea
.vscode
.git
.gitignore
.env
.env.local
.env.development
.env.test
.env.production
docker

4
docker/golang.Dockerfile

@ -20,4 +20,6 @@ WORKDIR /app
# Copy compiled from builder.
COPY --from=builder /app/whatsapp /app/whatsapp
# Run the binary.
ENTRYPOINT ["/app/whatsapp"]
ENTRYPOINT ["/app/whatsapp"]
CMD [ "rest" ]

5
readme.md

@ -159,7 +159,7 @@ make sure you have running MCP server, `./whatsapp mcp`
### Production Mode REST (docker)
```bash
docker run --detach --publish=3000:3000 --name=whatsapp --restart=always --volume=$(docker volume create --name=whatsapp):/app/storages aldinokemal2104/go-whatsapp-web-multidevice rest --autoreply="Dont't reply this message please"
docker run --detach --publish=3000:3000 --name=whatsapp --restart=always --volume=$(docker volume create --name=whatsapp):/app/storages aldinokemal2104/go-whatsapp-web-multidevice --autoreply="Dont't reply this message please"
```
### Production Mode REST (docker compose)
@ -177,7 +177,6 @@ services:
volumes:
- whatsapp:/app/storages
command:
- rest
- --basic-auth=admin:admin
- --port=3000
- --debug=true
@ -200,8 +199,6 @@ services:
- "3000:3000"
volumes:
- whatsapp:/app/storages
command:
- rest
environment:
- APP_BASIC_AUTH=admin:admin
- APP_PORT=3000

Loading…
Cancel
Save