Initial commit
This commit is contained in:
105
docker-compose.yml
Normal file
105
docker-compose.yml
Normal file
@@ -0,0 +1,105 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.apache
|
||||
container_name: timebank_app
|
||||
ports:
|
||||
- "8000:80"
|
||||
volumes:
|
||||
- .:/var/www/html
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
queue-worker:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.apache
|
||||
container_name: timebank_queue_worker
|
||||
command: php artisan queue:work --sleep=3 --tries=3 --timeout=90
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- .:/var/www/html
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
||||
scheduler:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.apache
|
||||
container_name: timebank_scheduler
|
||||
command: sh -c "while true; do php artisan schedule:run --verbose --no-interaction & sleep 60; done"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- .:/var/www/html
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
||||
db:
|
||||
image: mysql:8
|
||||
container_name: timebank_db
|
||||
ports:
|
||||
- "3307:3306"
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
env_file: .env
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
container_name: timebank_redis
|
||||
ports:
|
||||
- "6380:6379"
|
||||
command: redis-server --save 20 1 --loglevel warning
|
||||
volumes:
|
||||
- cache_data:/data
|
||||
|
||||
reverb:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.apache
|
||||
container_name: timebank_reverb
|
||||
command: php artisan reverb:start --host=0.0.0.0 --port=8080
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- .:/var/www/html
|
||||
env_file: .env
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
||||
# elasticsearch:
|
||||
# image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
|
||||
# container_name: timebank_elasticsearch
|
||||
# environment:
|
||||
# - discovery.type=single-node
|
||||
# ports:
|
||||
# - "9200:9200"
|
||||
# - "9300:9300"
|
||||
# volumes:
|
||||
# - es_data:/usr/share/elasticsearch/data
|
||||
# env_file: .env
|
||||
# ulimits:
|
||||
# memlock:
|
||||
# soft: -1
|
||||
# hard: -1
|
||||
# mem_limit: 1g
|
||||
# mem_reservation: 512m
|
||||
# depends_on:
|
||||
# - db
|
||||
# - redis
|
||||
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
driver: local
|
||||
cache_data:
|
||||
driver: local
|
||||
es_data:
|
||||
driver: local
|
||||
Reference in New Issue
Block a user