Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
0c3f9257
Commit
0c3f9257
authored
Mar 25, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update vz/azbyka/createbytask.sh
parent
0cc3dbbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
5 deletions
+30
-5
createbytask.sh
vz/azbyka/createbytask.sh
+30
-5
No files found.
vz/azbyka/createbytask.sh
View file @
0c3f9257
...
@@ -103,17 +103,22 @@ services:
...
@@ -103,17 +103,22 @@ services:
cap_add:
cap_add:
- SYS_ADMIN
- SYS_ADMIN
networks:
networks:
- azbyka_biblia_default
- default
# default:
# Error response from daemon: Invalid address 178.18.0.125: It does not belong to any of this network's subnets
# ipv4_address:
$VEIP
networks:
networks:
azbyka_biblia_
default:
default:
external:
external:
name: azbyka_
biblia_
default
name: azbyka_default
EOF
EOF
cd
composers/
$AUSER
cd
composers/
$AUSER
docker-compose create
||
fatal
docker-compose create
||
fatal
cd
-
cd
-
DOCKID
=
$AUSER
DOCKID
=
$AUSER
docker start
$DOCKID
||
fatal
docker start
$DOCKID
||
fatal
VEIP
=
$(
docker inspect
-f
'{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
$DOCKID
)
else
else
if
!
vzlist
-a
|
grep
"
$VEIP
"
;
then
if
!
vzlist
-a
|
grep
"
$VEIP
"
;
then
vzctl create
$VEID
--ostemplate
=
$TEMPLATE
||
fatal
vzctl create
$VEID
--ostemplate
=
$TEMPLATE
||
fatal
...
@@ -156,14 +161,34 @@ st()
...
@@ -156,14 +161,34 @@ st()
# TODO: first time only or force?
# TODO: first time only or force?
if
true
;
then
if
true
;
then
st update_chrooted conf
st update_chrooted conf
st epmI eepm
st epm update
st epm
--auto
install
eepm
st epm
--auto
upgrade
st epm
--auto
upgrade
fi
fi
# common projects (copy from base container)
# common projects (copy from base container)
if
[
-n
"
$VEIDORIG
"
]
;
then
if
[
-n
"
$VEIDORIG
"
]
;
then
if
[
!
-s
"apache/
$AUSER
.conf"
]
;
then
# copy nginx config from a01
if
[
!
-s
"/etc/nginx/sites-enabled.d/azbyka.d/
$NAME
.conf"
]
;
then
hostserver
cat
/var/lib/vz/root/900/etc/nginx/sites-enabled.d/azbyka.d/
$NAME
.conf
>
/etc/nginx/sites-enabled.d/azbyka.d/
$NAME
.conf
hostserver
cat
/var/lib/vz/root/900/etc/nginx/sites-enabled.d/azbyka.d/
$NAME
-manual
.conf
>
/etc/nginx/sites-enabled.d/azbyka.d/
$NAME
-manual
.conf
[
-s
/etc/nginx/sites-enabled.d/azbyka.d/
$NAME
-manual
.conf
]
||
rm
-f
/etc/nginx/sites-enabled.d/azbyka.d/
$NAME
-manual
.conf
hostserver
cat
/var/lib/vz/root/900/etc/nginx/include/static-fallback-
$NAME
.conf
>
/etc/nginx/include/static-fallback-
$NAME
.conf
fi
# hack
VEPORT
=
$(
printf
"%03d"
$((
$VEID
-
100
)))
cat
<<
EOF
> /etc/nginx/httpconf-enabled.d/upstream_
$ACONF
.conf
# for site
$ADOMAIN
/
$NAME
upstream sites8
$VEPORT
{
server
$VEIP
;
}
EOF
if
[
!
-s
"apache/
$ACONF
.conf"
]
;
then
hostserver
cat
/var/lib/vz/root/
$VEIDORIG
/etc/httpd2/conf/sites-enabled/
$ACONF
.conf
>
apache/
$ACONF
.conf
hostserver
cat
/var/lib/vz/root/
$VEIDORIG
/etc/httpd2/conf/sites-enabled/
$ACONF
.conf
>
apache/
$ACONF
.conf
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment