Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
Restyaboard
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Ali Arshad
Restyaboard
Commits
a5bfd15e
Commit
a5bfd15e
authored
Sep 29, 2015
by
Tsubasa Namiki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deploy app into docker image
parent
f0e91ffd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
35 deletions
+35
-35
README.md
README.md
+5
-6
docker-compose.yml
docker-compose.yml
+0
-2
Dockerfile
restyaboard/Dockerfile
+29
-15
docker-entrypoint.sh
restyaboard/docker-entrypoint.sh
+1
-12
No files found.
README.md
View file @
a5bfd15e
...
...
@@ -42,16 +42,15 @@ Password: restya
Change Restyaboard Version
------------------------------
Edit
docker-compose.yml
.
See
https://github.com/RestyaPlatform/board/releases
Edit
restyaboard/Dockerfile
.
Available version is
https://github.com/RestyaPlatform/board/releases
```
yaml
environment
:
RESTYABOARD_VERSION
:
REPLACE_ME
```
ENV restyaboard_version=REPLACE_ME
```
*
Notice
If you install a higher
than sourc
e version, it may not work, perhaps.
If you install a higher
version than Dockerfil
e version, it may not work, perhaps.
License
...
...
docker-compose.yml
View file @
a5bfd15e
...
...
@@ -27,8 +27,6 @@ restyaboard:
-
postgres:postgres
ports
:
-
1234:80
environment
:
RESTYABOARD_VERSION
:
v0.1.2
volumes_from
:
-
data
restart
:
always
restyaboard/Dockerfile
View file @
a5bfd15e
FROM
centos:7
# restyaboard version
ENV
restyaboard_version=v0.1.2
# add repository
RUN
\
rpm
--import
http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
;
\
rpm
-ivh
http://ftp-srv2.kddilabs.jp/Linux/packages/fedora/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
;
\
sed
-i
's/^enabled=1$/enabled=0/g'
/etc/yum.repos.d/epel.repo
;
\
rpm
--import
http://rpms.famillecollet.com/RPM-GPG-KEY-remi
;
\
rpm
-ivh
http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm
--import
http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
&&
\
rpm
-ivh
http://ftp-srv2.kddilabs.jp/Linux/packages/fedora/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
&&
\
sed
-i
's/^enabled=1$/enabled=0/g'
/etc/yum.repos.d/epel.repo
&&
\
rpm
--import
http://rpms.famillecollet.com/RPM-GPG-KEY-remi
&&
\
rpm
-ivh
http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
COPY
etc/yum.repos.d/nginx.repo /etc/yum.repos.d/
# update & install package
RUN
\
yum update
-y
;
\
yum install
-y
bzip2 cronie postfix postgresql
;
\
yum install
-y
--enablerepo
=
nginx nginx
;
\
yum install
-y
--enablerepo
=
remi-php56
\
php php-fpm php-pgsql php-mbstring php-pecl-imagick
;
\
yum install
-y
--enablerepo
=
epel nodejs npm
yum update
-y
&&
\
yum install
-y
bzip2 cronie postfix postgresql
&&
\
yum install
-y
--enablerepo
=
nginx nginx
&&
\
yum install
-y
--enablerepo
=
remi-php56
\
php php-fpm php-pgsql php-mbstring php-pecl-imagick
&&
\
yum install
-y
--enablerepo
=
epel nodejs npm
RUN
npm install
-g
grunt-cli
# setting php-fpm
RUN
\
sed
-i
's/^user = apache$/user = nginx/g'
/etc/php-fpm.d/www.conf
;
\
sed
-i
's/^group = apache$/group = nginx/g'
/etc/php-fpm.d/www.conf
sed
-i
's/^user = apache$/user = nginx/g'
/etc/php-fpm.d/www.conf
&&
\
sed
-i
's/^group = apache$/group = nginx/g'
/etc/php-fpm.d/www.conf
# initial document root
RUN
rm
-rf
/usr/share/nginx/html
&&
mkdir /usr/share/nginx/html
# remove document root
RUN
rm
-rf
/usr/share/nginx/html
# deploy app
WORKDIR
/usr/share/nginx/html
RUN
\
curl
-L
-o
/tmp/restyaboard.tar.gz https://github.com/RestyaPlatform/board/archive/
${
restyaboard_version
}
.tar.gz
&&
\
tar
xzvf /tmp/restyaboard.tar.gz
--strip-components
1
&&
\
rm /tmp/restyaboard.tar.gz
&&
\
cp
-R
media /tmp/
&&
\
cp restyaboard.conf /etc/nginx/conf.d
&&
\
npm install
&&
\
grunt build:live
# volume
VOLUME
/usr/share/nginx/html/media
...
...
restyaboard/docker-entrypoint.sh
View file @
a5bfd15e
...
...
@@ -3,18 +3,6 @@
set
-e
if
[
"
$1
"
=
'start'
]
;
then
# deploy
if
[
!
-e
/usr/share/nginx/html/restyaboard.conf
]
;
then
cd
/tmp
curl
-L
-o
restyaboard.tar.gz https://github.com/RestyaPlatform/board/archive/
${
RESTYABOARD_VERSION
}
.tar.gz
mkdir html
&&
tar
xzvf restyaboard.tar.gz
-C
html
--strip-components
1
cp
-rf
html /usr/share/nginx/
cd
/usr/share/nginx/html
cp restyaboard.conf /etc/nginx/conf.d
npm install
grunt build:live
fi
# config
sed
-i
"s/^.*'R_DB_NAME'.*
$/
define('R_DB_NAME', 'restyaboard');/g"
\
/usr/share/nginx/html/server/php/R/config.inc.php
...
...
@@ -29,6 +17,7 @@ if [ "$1" = 'start' ]; then
echo
'*/5 * * * * php /usr/share/nginx/htmlserver/php/R/shell/cron.php'
>
/var/spool/cron/root
# media
cp
-R
/tmp/media /usr/share/nginx/html/
chmod
-R
go+w /usr/share/nginx/html/media
chmod
-R
go+w /usr/share/nginx/html/client/img
...
...
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