mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-21 05:43:08 +00:00
DVL-004 Use named volumes for container-only shared data (like sockets)
This commit is contained in:
parent
edf788f6dd
commit
f400c5b280
@ -376,9 +376,6 @@
|
|||||||
<td>./etc</td>
|
<td>./etc</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>MySQL socket</th>
|
|
||||||
<td>./run/mysql/mysqld.sock</td>
|
|
||||||
</tr> <tr>
|
|
||||||
<th>Log directory</th>
|
<th>Log directory</th>
|
||||||
<td>./log</td>
|
<td>./log</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -403,10 +400,6 @@
|
|||||||
<th>MySQL datadir</th>
|
<th>MySQL datadir</th>
|
||||||
<td><?php echo $Docker->getEnv('HOST_PATH_TO_MYSQL_DATADIR');?></td>
|
<td><?php echo $Docker->getEnv('HOST_PATH_TO_MYSQL_DATADIR');?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<th>MySQL socket</th>
|
|
||||||
<td>./run/mysql/mysqld.sock</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Log directory</th>
|
<th>Log directory</th>
|
||||||
<td>./log</td>
|
<td>./log</td>
|
||||||
|
@ -179,10 +179,10 @@ services:
|
|||||||
- ${DEVILBOX_PATH}/log/${PHP_SERVER}:/var/log/php-fpm
|
- ${DEVILBOX_PATH}/log/${PHP_SERVER}:/var/log/php-fpm
|
||||||
|
|
||||||
# Mount MySQL Socket directory
|
# Mount MySQL Socket directory
|
||||||
- ${DEVILBOX_PATH}/run/mysql:/tmp/mysql
|
- mysql_socket_volume:/tmp/mysql
|
||||||
|
|
||||||
# Mount Mail directory
|
# Mount Mail directory
|
||||||
- ${DEVILBOX_PATH}/run/mail:/var/mail
|
#- ${DEVILBOX_PATH}/run/mail:/var/mail
|
||||||
|
|
||||||
# Mount devilbox user-defined *.ini files in order
|
# Mount devilbox user-defined *.ini files in order
|
||||||
# to overwrite the default PHP configuration
|
# to overwrite the default PHP configuration
|
||||||
@ -241,7 +241,7 @@ services:
|
|||||||
- ${DEVILBOX_PATH}/log/${MYSQL_SERVER}:/var/log/mysql
|
- ${DEVILBOX_PATH}/log/${MYSQL_SERVER}:/var/log/mysql
|
||||||
|
|
||||||
# Mount MySQL Socket directory
|
# Mount MySQL Socket directory
|
||||||
- ${DEVILBOX_PATH}/run/mysql:/tmp/mysql
|
- mysql_socket_volume:/tmp/mysql
|
||||||
|
|
||||||
# Mount devilbox user-defined cnf files in order
|
# Mount devilbox user-defined cnf files in order
|
||||||
# to overwrite the MySQL server configuration
|
# to overwrite the MySQL server configuration
|
||||||
@ -284,12 +284,27 @@ services:
|
|||||||
- ${DEVILBOX_PATH}/log/postgres-${POSTGRES_SERVER}:/var/log/postgresql
|
- ${DEVILBOX_PATH}/log/postgres-${POSTGRES_SERVER}:/var/log/postgresql
|
||||||
|
|
||||||
# Mount PostgreSQL Socket directory
|
# Mount PostgreSQL Socket directory
|
||||||
- ${DEVILBOX_PATH}/run/postgres:/var/run/postgresql
|
- pgsql_socket_volume:/var/run/postgresql
|
||||||
|
|
||||||
# Mount PostgreSQL Data directory
|
# Mount PostgreSQL Data directory
|
||||||
- ${HOST_PATH_TO_POSTGRES_DATADIR}:/var/lib/postgresql/data/pgdata
|
- ${HOST_PATH_TO_POSTGRES_DATADIR}:/var/lib/postgresql/data/pgdata
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# VOLUMES
|
||||||
|
################################################################################
|
||||||
|
volumes:
|
||||||
|
# Create volume for mysql socket.
|
||||||
|
# This removes the need to mount the socket to the host
|
||||||
|
# but be able to mount it to different containers (from another container)
|
||||||
|
mysql_socket_volume:
|
||||||
|
|
||||||
|
# Create volume for postgresql socket.
|
||||||
|
# This removes the need to mount the socket to the host
|
||||||
|
# but be able to mount it to different containers (from another container)
|
||||||
|
pgsql_socket_volume:
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# NETWORK
|
# NETWORK
|
||||||
################################################################################
|
################################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user