added docker compose
parent
7ea102fbed
commit
a53b7ee4a4
51
Home.md
51
Home.md
@ -22,3 +22,54 @@ sudo docker push 4lights/phpcontainer:latest
|
||||
References:
|
||||
|
||||
- https://stackoverflow.com/questions/49854767/docker-php7-2-fpm-cant-install-imap-module
|
||||
|
||||
# Sample Docker Compose
|
||||
|
||||
```
|
||||
---
|
||||
version: "3.3"
|
||||
|
||||
volumes:
|
||||
db:
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: ${NETWORKNAME}
|
||||
|
||||
services:
|
||||
|
||||
db:
|
||||
image: mariadb:latest
|
||||
restart: always
|
||||
container_name: "${DBHOST}"
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||||
MYSQL_PASSWORD: ${DBPASSWORD}
|
||||
MYSQL_DATABASE: ${DB}
|
||||
MYSQL_USER: ${DBUSER}
|
||||
volumes:
|
||||
- "db:/var/lib/mysql"
|
||||
|
||||
php-app:
|
||||
container_name: "${DOCKERNAME}"
|
||||
image: "4lights/phpcontainer:latest"
|
||||
restart: always
|
||||
volumes:
|
||||
- "./:/website"
|
||||
ports:
|
||||
- "${DOCKERPORT}:80"
|
||||
```
|
||||
|
||||
env file:
|
||||
```
|
||||
NETWORKNAME=PROXY_NETWORK
|
||||
DBHOST=DB_HOST_NAME
|
||||
MYSQL_ROOT_PASSWORD=ChangeMe
|
||||
DBPASSWORD=ChangeMeAlso
|
||||
DB=DATABASENAME
|
||||
DBUSER=DBUSERNAME
|
||||
DOCKERNAME=Container_name
|
||||
DOCKERPORT=8000
|
||||
|
||||
```
|
Loading…
Reference in New Issue
Block a user