initial commit

This commit is contained in:
2025-10-19 17:54:53 +01:00
parent 0ca0d9898f
commit 501f61788d
7 changed files with 77 additions and 0 deletions

5
PHP56_e_MySQL/README.md Normal file
View File

@@ -0,0 +1,5 @@
# PHP5.6 e MySQL
## Cose interessanti
1. si può accedere alle variabile di ambiente del container con PHP facendo
```<?php echo ('ENV' . getenv(NOMEVARIABILE) ); ?>```

View File

@@ -0,0 +1,42 @@
version: '3.5'
services:
mysql:
container_name: db
image: mysql:5.7.9
ports:
- "3306:3306"
volumes:
- ./db:/var/lib/mysql
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "no"
MYSQL_ROOT_PASSWORD: "MYSQL_ROOT_PASSWORD"
MYSQL_DATABASE: "MYSQL_DB"
restart: 'unless-stopped'
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 10s
retries: 5
PHP56:
image: porchn/php5.6-apache
container_name: php56
ports:
- "8888:80"
volumes:
- ./apache2/www:/var/www
- ./apache2/logs:/var/log/apache2
networks:
default:
ipv4_address: 172.10.0.3
environment:
- TZ=Europe/Rome
restart: 'unless-stopped'
depends_on:
mysql:
condition: service_healthy
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.10.0.0/24
gateway: 172.10.0.1

View File