Skip to content

Commit

Permalink
add docker-compose file.
Browse files Browse the repository at this point in the history
  • Loading branch information
twose committed Jan 20, 2018
1 parent bce2326 commit 3bfd1f9
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: '3.4'
services:
swoole:
image: "twosee/swoole-coroutine"
ports:
- "9501:9501"
volumes:
- ./src:/app/src:rw
restart: always
depends_on:
- mysql
command: php /app/src/server.php start

mysql:
image: "twosee/swoole-coroutine:mysql"
ports:
- "9502:3306"
volumes:
- ./data/mysql/data:/var/lib/mysql:rw
- ./data/mysql/sock:/var/run/mysqld:rw # remove when windows.
restart: always
environment:
MYSQL_ROOT_PASSWORD: root_password_here
MYSQL_DATABASE: test
MYSQL_USER: php
MYSQL_PASSWORD: php_user_password_here

redis:
image: "twosee/swoole-coroutine:redis"
ports:
- "9503:6379"
volumes:
- ./data/redis/data:/var/lib/redis:rw
sysctls:
net.core.somaxconn: 65535
restart: always

0 comments on commit 3bfd1f9

Please sign in to comment.