Created
January 8, 2020 05:33
-
-
Save cftang0827/c6852234bdd1768321e6e87cb04f5cd9 to your computer and use it in GitHub Desktop.
docker-compose-circleci-sample-2
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: redis | |
| restart: always | |
| ports: | |
| - "6379:6379" | |
| celery: | |
| build: . | |
| image: celery | |
| command: | |
| celery -A api worker -l info && echo "Check db and redis OK" | |
| container_name: 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