Chore: modify docker-compose for prod and local setups (#1090)

This commit is contained in:
Karan Sharma
2020-07-24 23:34:09 +05:30
committed by GitHub
parent c7d962b20f
commit bb83d6ee4d
2 changed files with 70 additions and 20 deletions

View File

@@ -2,20 +2,11 @@ version: '3'
services:
base: &base
build:
context: .
dockerfile: ./docker/Dockerfile
args:
BUNDLE_WITHOUT: 'development:test'
EXECJS_RUNTIME: Disabled
RAILS_ENV: 'production'
RAILS_SERVE_STATIC_FILES: 'true'
image: chatwoot:latest
image: chatwoot/chatwoot:latest
env_file: .env ## Change this file for customized env variables
rails:
<<: *base
image: chatwoot:latest
depends_on:
- postgres
- redis
@@ -29,7 +20,6 @@ services:
sidekiq:
<<: *base
image: chatwoot:latest
depends_on:
- postgres
- redis
@@ -44,23 +34,17 @@ services:
ports:
- '5432:5432'
volumes:
- postgres:/data/postgres
- /data/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_DB=chatwoot
- POSTGRES_USER=postgres
# Please provide your own password.
- POSTGRES_PASSWORD=
redis:
image: redis:alpine
restart: always
volumes:
- redis:/data/redis
- /data/redis:/data
ports:
- '6379:6379'
volumes:
postgres:
redis:
bundle:
packs:
node_modules_rails: