Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bolt
Project
Project
Details
Activity
Releases
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
Registry
Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
containers
bolt
Commits
8c794c34
Commit
8c794c34
authored
Sep 14, 2017
by
Vadym Gidulian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
117 additions
and
0 deletions
+117
-0
.gitlab-ci.yml
.gitlab-ci.yml
+55
-0
Dockerfile
Dockerfile
+29
-0
bolt-entrypoint.sh
bolt-entrypoint.sh
+33
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
8c794c34
services
:
-
docker:dind
variables
:
IMAGE_SNAPSHOT
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-snapshot
IMAGE
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
IMAGE_LATEST
:
$CI_REGISTRY_IMAGE:latest
stages
:
-
build
-
test
-
release
before_script
:
-
docker version
-
docker info
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
build
:
stage
:
build
script
:
-
docker build --pull -t $IMAGE_SNAPSHOT .
-
docker push $IMAGE_SNAPSHOT
tags
:
-
dind
test
:
stage
:
test
script
:
-
docker pull $IMAGE_SNAPSHOT
-
docker run --rm --entrypoint='bash' $IMAGE_SNAPSHOT -c '[[ $(ls -A /usr/src/bolt) ]] && echo "Bolt is downloaded."'
tags
:
-
dind
release
:
stage
:
release
script
:
-
docker pull $IMAGE_SNAPSHOT
-
docker tag $IMAGE_SNAPSHOT $IMAGE
-
docker push $IMAGE
tags
:
-
dind
except
:
-
master
release:latest
:
stage
:
release
script
:
-
docker pull $IMAGE_SNAPSHOT
-
docker tag $IMAGE_SNAPSHOT $IMAGE_LATEST
-
docker push $IMAGE_LATEST
tags
:
-
dind
only
:
-
master
Dockerfile
0 → 100644
View file @
8c794c34
FROM
php:apache
MAINTAINER
Vadym Gidulian <vadym.gidulian@gvia.group>
COPY
bolt-entrypoint.sh /usr/local/bin/
VOLUME
/bolt
WORKDIR
/bolt
RUN
apt-get update
&&
\
apt-get
install
-y
\
libicu-dev
\
libjpeg-dev
\
libpng-dev
&&
\
\
docker-php-ext-configure gd
--with-jpeg-dir
=
/usr/lib
&&
\
docker-php-ext-install exif gd intl opcache pdo_mysql zip
&&
\
\
rm
-rf
/var/lib/apt/lists/
*
&&
\
\
mkdir
/usr/src/bolt
&&
\
curl https://bolt.cm/distribution/bolt-latest.tar.gz |
tar
xzC /usr/src/bolt
--strip-components
=
1
&&
\
\
rm
-r
/var/www/html
&&
\
ln
-s
/bolt/public /var/www/html
&&
\
\
a2enmod rewrite
&&
\
sed
-i
's/AllowOverride None/AllowOverride All/'
/etc/apache2/apache2.conf
ENTRYPOINT
["bolt-entrypoint.sh"]
bolt-entrypoint.sh
0 → 100755
View file @
8c794c34
#!/bin/bash
set
-e
if
!
[
-e
$PWD
/app/nut
-a
-e
$PWD
/public/index.php
]
;
then
echo
>
&2
"Bolt not found in
$PWD
. Installing now..."
if
[
"
$(
ls
-A
)
"
]
;
then
echo
>
&2
"WARNING:
$PWD
is not empty! Press Ctrl+C now if this is an error!"
(
set
-x
;
ls
-A
;
sleep
10
)
fi
tar
cplC /usr/src/bolt
.
|
tar
xplC
$PWD
php app/nut init
set
+e
chown
-R
www-data:www-data
.
chmod
a+r
.
for
dir
in
app/cache/ app/database/ public/thumbs/
do
find
$dir
-type
d
-print0
| xargs
-0
chmod
u+rwx,g+rwxs,o+rx-w
find
$dir
-type
f
-print0
| xargs
-0
chmod
u+rw-x,g+rw-x,o+r-wx
>
/dev/null 2>&1
done
for
dir
in
app/config/ extensions/ public/extensions/ public/files/ public/theme/
do
find
$dir
-type
d
-print0
| xargs
-0
chmod
u+rwx,g+rwxs,o+rx-w
find
$dir
-type
f
-print0
| xargs
-0
chmod
u+rw-x,g+rw-x,o+r-wx
>
/dev/null 2>&1
done
set
-e
echo
>
&2
"Finished. Bolt has been successfully installed into
$PWD
."
fi
docker-php-entrypoint apache2-foreground
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