# change location to the path you want chatwoot to be installedcd ~# clone the repo and cd to chatwoot dirgit clone https://github.com/chatwoot/chatwoot.gitcd chatwoot
Follow this section only if you are trying to setup Chatwoot via docker. Else skip this.
The first time you start your development environment run the following two commands:
Copy
# build base image firstdocker compose build base# build the server and workerdocker compose build# prepare the databasedocker compose exec rails bundle exec rails db:chatwoot_prepare# docker compose up
# To stop your environment use Control+C (on Mac) CTRL+C (on Win) ordocker compose down# start the servicesdocker compose up
When you change the service’s Dockerfile or the contents of the build directory, run stop then build. (For example after modifying package.json or Gemfile)
Copy
docker compose stopdocker compose build
The docker-compose environment consists of:
chatwoot server
postgres
redis
webpacker-dev-server
If in case you encounter a seeding issue or you want reset the database you can do it using the following command:
Copy
docker compose run --rm rails bundle exec rake db:reset
This command essentially runs postgres and redis containers and then run the rake command inside the chatwoot server container.
This will build the image which you can deploy in Kubernetes (GCP, Openshift, AWS, Azure or anywhere), Amazon ECS or Docker Swarm. You can tag this image and push this image to docker registry of your choice.Remember to make the required environment variables available during the deployment.