Skip to content

Instantly share code, notes, and snippets.

@weidmaster
Created October 22, 2024 14:22
Show Gist options
  • Save weidmaster/3c4608355fd92558069e4004f6932f36 to your computer and use it in GitHub Desktop.
Save weidmaster/3c4608355fd92558069e4004f6932f36 to your computer and use it in GitHub Desktop.
docker-compose for PHP 5 with mySQL 8
networks:
app-network:
services:
webserver:
container_name: PHP-webserver
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/var/www/html
ports:
- 8000:80
networks:
- app-network
mysql:
image: mysql:8.0
restart: always
volumes:
- ./mysql:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=password
command: --character-set-server=utf8 --collation-server=utf8_unicode_ci --default-authentication-plugin=mysql_native_password
ports:
- 3307:3306
networks:
- app-network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment