-
Notifications
You must be signed in to change notification settings - Fork 6.2k
feat: add docker-compose configuration for evolution-api, redis, and postgres services #2527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| services: | ||
| api: | ||
| container_name: evolution_api | ||
| image: evoapicloud/evolution-api:latest | ||
| restart: always | ||
| depends_on: | ||
| - redis | ||
| - evolution_postgres | ||
| ports: | ||
| - "8080:8080" | ||
| env_file: | ||
| - .env | ||
| networks: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (bug_risk): Lack of a volume for Postgres means database data will be lost when the container is removed. If this is meant for more than disposable local testing, define a named volume for Suggested implementation: You also need to declare the named volume volumes:
evolution_postgres_data:Place this alongside the existing top-level |
||
| - evolution-net | ||
|
|
||
| redis: | ||
| container_name: evolution_redis | ||
| image: redis:latest | ||
| restart: always | ||
| networks: | ||
| - evolution-net | ||
|
|
||
| evolution_postgres: | ||
| container_name: evolution_postgres | ||
| image: postgres:15 | ||
| restart: always | ||
| env_file: | ||
| - .env | ||
| environment: | ||
| - POSTGRES_DB=evolution_db | ||
| - POSTGRES_USER=postgres | ||
| - POSTGRES_PASSWORD=postgres_pass | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚨 issue (security): Hard-coding the database password in the compose file is a security risk. Even for local use, embedding |
||
| networks: | ||
| - evolution-net | ||
|
|
||
| networks: | ||
| evolution-net: | ||
| driver: bridge | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Using
latesttags for images can make deployments non-reproducible and harder to debug.For both
apiandredis, please pin images to specific versions or digests (e.g.evoapicloud/evolution-api:1.2.3,redis:7.2) so updates are explicit and controlled.Suggested implementation: