Added mounting volume with openstack.
This commit is contained in:
parent
1109f80fdf
commit
8e467b7509
@ -12,15 +12,9 @@ services:
|
|||||||
- '80'
|
- '80'
|
||||||
- '443'
|
- '443'
|
||||||
volumes:
|
volumes:
|
||||||
- onlyoffice_data:/var/www/onlyoffice/Data
|
- /mnt/volumes/onlyoffice_data/data:/var/www/onlyoffice/Data
|
||||||
- onlyoffice_log:/var/log/onlyoffice
|
- /mnt/volumes/onlyoffice_log/data:/var/log/onlyoffice
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
reverse-proxy:
|
reverse-proxy:
|
||||||
external: true
|
external: true
|
||||||
|
|
||||||
volumes:
|
|
||||||
onlyoffice_data:
|
|
||||||
external: true
|
|
||||||
onlyoffice_log:
|
|
||||||
external: true
|
|
||||||
|
21
start.sh
Executable file
21
start.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source ~/openrc.sh
|
||||||
|
INSTANCE=$(/home/yohan/env_py3/bin/openstack server show -c id --format value $(hostname))
|
||||||
|
mkdir -p /mnt/volumes/onlyoffice_data
|
||||||
|
if ! mountpoint -q /mnt/volumes/onlyoffice_data
|
||||||
|
then
|
||||||
|
VOLUME_ID=$(/home/yohan/env_py3/bin/openstack volume show onlyoffice_data -c id --format value)
|
||||||
|
test -e /dev/disk/by-id/*${VOLUME_ID:0:20} || nova volume-attach $INSTANCE $VOLUME_ID auto
|
||||||
|
sleep 3
|
||||||
|
sudo mount /dev/disk/by-id/*${VOLUME_ID:0:20} /mnt/volumes/onlyoffice_data
|
||||||
|
fi
|
||||||
|
mkdir -p /mnt/volumes/onlyoffice_log
|
||||||
|
if ! mountpoint -q /mnt/volumes/onlyoffice_log
|
||||||
|
then
|
||||||
|
VOLUME_ID=$(/home/yohan/env_py3/bin/openstack volume show onlyoffice_log -c id --format value)
|
||||||
|
test -e /dev/disk/by-id/*${VOLUME_ID:0:20} || nova volume-attach $INSTANCE $VOLUME_ID auto
|
||||||
|
sleep 3
|
||||||
|
sudo mount /dev/disk/by-id/*${VOLUME_ID:0:20} /mnt/volumes/onlyoffice_log
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo docker-compose up -d
|
Loading…
Reference in New Issue
Block a user