mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 11:08:04 +00:00 
			
		
		
		
	Chore: modify docker-compose for prod and local setups (#1090)
This commit is contained in:
		| @@ -2,20 +2,11 @@ version: '3' | |||||||
|  |  | ||||||
| services: | services: | ||||||
|   base: &base |   base: &base | ||||||
|     build: |     image: chatwoot/chatwoot:latest | ||||||
|       context: . |  | ||||||
|       dockerfile: ./docker/Dockerfile |  | ||||||
|       args: |  | ||||||
|         BUNDLE_WITHOUT: 'development:test' |  | ||||||
|         EXECJS_RUNTIME: Disabled |  | ||||||
|         RAILS_ENV: 'production' |  | ||||||
|         RAILS_SERVE_STATIC_FILES: 'true' |  | ||||||
|     image: chatwoot:latest |  | ||||||
|     env_file: .env ## Change this file for customized env variables |     env_file: .env ## Change this file for customized env variables | ||||||
|  |  | ||||||
|   rails: |   rails: | ||||||
|     <<: *base |     <<: *base | ||||||
|     image: chatwoot:latest |  | ||||||
|     depends_on: |     depends_on: | ||||||
|       - postgres |       - postgres | ||||||
|       - redis |       - redis | ||||||
| @@ -29,7 +20,6 @@ services: | |||||||
|  |  | ||||||
|   sidekiq: |   sidekiq: | ||||||
|     <<: *base |     <<: *base | ||||||
|     image: chatwoot:latest |  | ||||||
|     depends_on: |     depends_on: | ||||||
|       - postgres |       - postgres | ||||||
|       - redis |       - redis | ||||||
| @@ -44,23 +34,17 @@ services: | |||||||
|     ports: |     ports: | ||||||
|       - '5432:5432' |       - '5432:5432' | ||||||
|     volumes: |     volumes: | ||||||
|       - postgres:/data/postgres |       - /data/postgres:/var/lib/postgresql/data | ||||||
|     environment: |     environment: | ||||||
|       - POSTGRES_DB=chatwoot |       - POSTGRES_DB=chatwoot | ||||||
|       - POSTGRES_USER=postgres |       - POSTGRES_USER=postgres | ||||||
|  |       # Please provide your own password. | ||||||
|       - POSTGRES_PASSWORD= |       - POSTGRES_PASSWORD= | ||||||
|  |  | ||||||
|   redis: |   redis: | ||||||
|     image: redis:alpine |     image: redis:alpine | ||||||
|     restart: always |     restart: always | ||||||
|     volumes: |     volumes: | ||||||
|       - redis:/data/redis |       - /data/redis:/data | ||||||
|     ports: |     ports: | ||||||
|       - '6379:6379' |       - '6379:6379' | ||||||
|  |  | ||||||
| volumes: |  | ||||||
|   postgres: |  | ||||||
|   redis: |  | ||||||
|   bundle: |  | ||||||
|   packs: |  | ||||||
|   node_modules_rails: |  | ||||||
|   | |||||||
							
								
								
									
										66
									
								
								docker-compose.test.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								docker-compose.test.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,66 @@ | |||||||
|  | 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 | ||||||
|  |     env_file: .env ## Change this file for customized env variables | ||||||
|  |  | ||||||
|  |   rails: | ||||||
|  |     <<: *base | ||||||
|  |     image: chatwoot:latest | ||||||
|  |     depends_on: | ||||||
|  |       - postgres | ||||||
|  |       - redis | ||||||
|  |     ports: | ||||||
|  |       - 3000:3000 | ||||||
|  |     environment: | ||||||
|  |       - NODE_ENV=production | ||||||
|  |       - RAILS_ENV=production | ||||||
|  |     entrypoint: docker/entrypoints/rails.sh | ||||||
|  |     command: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0'] | ||||||
|  |  | ||||||
|  |   sidekiq: | ||||||
|  |     <<: *base | ||||||
|  |     image: chatwoot:latest | ||||||
|  |     depends_on: | ||||||
|  |       - postgres | ||||||
|  |       - redis | ||||||
|  |     environment: | ||||||
|  |       - NODE_ENV=production | ||||||
|  |       - RAILS_ENV=production | ||||||
|  |     command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml'] | ||||||
|  |  | ||||||
|  |   postgres: | ||||||
|  |     image: postgres:12 | ||||||
|  |     restart: always | ||||||
|  |     ports: | ||||||
|  |       - '5432:5432' | ||||||
|  |     volumes: | ||||||
|  |       - postgres:/data/postgres | ||||||
|  |     environment: | ||||||
|  |       - POSTGRES_DB=chatwoot | ||||||
|  |       - POSTGRES_USER=postgres | ||||||
|  |       - POSTGRES_PASSWORD= | ||||||
|  |  | ||||||
|  |   redis: | ||||||
|  |     image: redis:alpine | ||||||
|  |     restart: always | ||||||
|  |     volumes: | ||||||
|  |       - redis:/data/redis | ||||||
|  |     ports: | ||||||
|  |       - '6379:6379' | ||||||
|  |  | ||||||
|  | volumes: | ||||||
|  |   postgres: | ||||||
|  |   redis: | ||||||
|  |   bundle: | ||||||
|  |   packs: | ||||||
|  |   node_modules_rails: | ||||||
		Reference in New Issue
	
	Block a user
	 Karan Sharma
					Karan Sharma