Improve Docker installation (#152)

This commit is contained in:
Riccardo Graziosi
2022-09-15 17:15:12 +02:00
committed by GitHub
parent 6198d814d8
commit fd3665cce6
37 changed files with 218 additions and 333 deletions

View File

@@ -29,24 +29,45 @@ Astuto is a free, open source, self-hosted customer feedback tool. It helps you
## Installation
**Note**: it is strongly suggested to run Astuto on Linux or macOS. As of today, Windows is likely to [cause problems](https://github.com/riggraz/astuto/wiki/Common-problems#standard_init_linuxgo211-exec-user-process-caused-no-such-file-or-directory). If you want to try anyway, follow along with the [Windows users installation guide](https://github.com/riggraz/astuto/wiki/Installation-for-Windows-users).
### DockerHub image (fastest, for production)
### Manual (for development)
1. Create an empty folder
2. Inside that folder, create a `docker-compose.yml` file with the following content:
```
version: '3.4'
services:
db:
image: postgres:14.5
environment:
POSTGRES_USER: yourpostgresusername
POSTGRES_PASSWORD: yourpostgrespassword
volumes:
- dbdata:/var/lib/postgresql/data
web:
image: riggraz/astuto:latest
environment:
POSTGRES_USER: yourpostgresusername
POSTGRES_PASSWORD: yourpostgrespassword
BASE_URL: http://yourwebsite.com
SECRET_KEY_BASE: yoursecretkeybase
ports:
- "3000:3000"
depends_on:
- db
volumes:
dbdata:
```
3. Edit the environment variables to fit your needs
4. Run `docker-compose pull`
5. Run `docker-compose up`
6. You should now have a running instance of Astuto on port 3000. A default user account has been created with credentials email: `admin@example.com`, password: `password`.
1. Clone this repository.
2. In Astuto's root directory, create a file named `.env` and fill it with the required environment variables (see `.env-example` for an example and check [this wiki page](https://github.com/riggraz/astuto/wiki/Required-environment-variables) for an explanation of the variables).
3. Run `script/docker-update-and-run.sh`.
4. You should now have a running instance of Astuto at `localhost:3000`. A default user account has been created with credentials email: `admin@example.com`, password: `password`.
### GitHub repository (for development)
### Using DockerHub image (fastest)
**Note**: this installation method is suggested for developers and contributors. If you just want to deploy your Astuto instance or try it out, we recommend to follow the above DockerHub installation instructions.
Coming soon!
## Post-installation notes
* **If you run into any problems take a look at the [common problems page](https://github.com/riggraz/astuto/wiki/Common-problems)**.
* When you want to launch Astuto you have to run `script/docker-run.sh`. If you installed new gems, packages or updated the database schema, you first need to run `script/docker-update.sh` and then `script/docker-run.sh`. You can run them together with `script/docker-update-and-run.sh`.
* If you changed some environment variables in `.env` you have to restart the instance for these changes to take effect.
See [contributing guidelines](https://github.com/riggraz/astuto/blob/main/CONTRIBUTING.md).
## Contributing