Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,31 @@ services:
app_net:
ipv4_address: 172.16.1.40

MYSQL:
hostname: docker-mysql
image: mysql:5.7
ports:
- 3306:3306
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./Database/mysql:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
command: mysqld --sql_mode="" --character-set-server=utf8 --init-connect='SET NAMES UTF8;'
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
reservations:
memory: 256M
restart_policy:
condition: on-failure
networks:
- app_net

NGINX:
hostname: docker-nginx
build:
Expand Down Expand Up @@ -69,6 +94,7 @@ services:
- ${VOLUMES_DRIVER}:/var/www
depends_on:
- FPM
- MYSQL
restart: on-failure
extra_hosts:
- "localhost:172.16.1.50"
Expand Down
7 changes: 7 additions & 0 deletions env-example
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@

# e.g. /Users/USER_NAME/Projects
VOLUMES_DRIVER=



# mysql
MYSQL_ROOT_PASSWORD=
MYSQL_USER=
MYSQL_PASSWORD=
2 changes: 1 addition & 1 deletion phpWrapper
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ fi

docker run --rm -i \
-v $VOLUMES_DRIVER:/var/www \
cscolabear/7.3-fpm:0.1 php "$@"
cscolabear/7.3-fpm:0.1 "$@"