Created
January 8, 2020 05:35
-
-
Save cftang0827/b72b5111c14e48512a8c6b8c2d2ec5db to your computer and use it in GitHub Desktop.
docker compose circleci sample 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
db: | |
image: mysql:5.7 | |
restart: always | |
container_name: db | |
ports: | |
- "3306:3306" | |
environment: | |
- MYSQL_DATABASE=test | |
- MYSQL_ROOT_PASSWORD=xxxxx | |
- MYSQL_PORT=3306 | |
redis: | |
image: redis | |
container_name: vs_api_redis | |
restart: always | |
ports: | |
- "6379:6379" | |
celery: | |
build: . | |
image: celery | |
command: | |
bash -c "./wait-for-it.sh db:3306 -- ./wait-for-it.sh redis:6379 -- celery -A vs_api worker -l info && echo "Check db and redis OK"" | |
container_name: vs_api_celery | |
depends_on: | |
- db | |
- redis | |
links: | |
- db | |
- redis | |
environment: | |
- DATABASE_MASTER_URL=######Link to db########## | |
- CELERY_REDIS_URL=redis://redis:6379 | |
volumes: | |
db_data: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment