Skip to content

Commit

Permalink
🎨 新增mysql docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xkrfer committed Mar 26, 2022
1 parent 1dd9830 commit ae23a83
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 13 deletions.
22 changes: 22 additions & 0 deletions docker-compose.mysql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '2.1'
services:
redis:
image: 'bitnami/redis:6.2'
healthcheck:
test: ["CMD", "redis-cli","ping"]
environment:
- ALLOW_EMPTY_PASSWORD=yes
app:
build: '.'
ports:
- '8800:8800'
depends_on:
redis:
condition: service_healthy
environment:
- DB_HOST=<your mysql host>
- DB_PORT=<your mysql port>
- DB_USERNAME=<your mysql username>
- DB_DATABASE=<your mysql database>
- DB_PASSWORD=<your mysql password>
- REDIS_HOST=redis
18 changes: 5 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,17 @@ services:
test: ["CMD", "mysqladmin", "ping", "--silent","--password=$$MYSQL_ROOT_PASSWORD"]
timeout: 10s
retries: 3
# volumes:
# - 'mariadb_data:/var/lib/mysql'
volumes:
- 'mariadb_data:/var/lib/mysql'
environment:
- MYSQL_ROOT_PASSWORD=theVeryp@ssw0rd
- MYSQL_DATABASE=pushdeer
redis:
image: 'bitnami/redis:6.0.16'
image: 'bitnami/redis:6.2'
healthcheck:
test: ["CMD", "redis-cli","ping"]
environment:
- ALLOW_EMPTY_PASSWORD=yes
gorush:
image: 'appleboy/gorush'
healthcheck:
test: [ "CMD", "redis-cli","ping" ]
environment:
- ALLOW_EMPTY_PASSWORD=yes
app:
build: '.'
ports:
Expand All @@ -39,8 +33,6 @@ services:
- DB_DATABASE=pushdeer
- DB_PASSWORD=theVeryp@ssw0rd
- REDIS_HOST=redis
- GO_PUSH_IOS_TOPIC=com.pushdeer.self.ios
- GO_PUSH_IOS_CLIP_TOPIC=com.pushdeer.self.ios.Clip
- APP_DEBUG=true
#volumes:
# mariadb_data:
volumes:
mariadb_data:

0 comments on commit ae23a83

Please sign in to comment.