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
6efab5a1
Commit
6efab5a1
authored
Mar 27, 2017
by
Christophe Angeli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use alpine
parent
15390adc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
54 deletions
+31
-54
Dockerfile
Dockerfile
+30
-46
docker-compose.yml
docker-compose.yml
+1
-8
No files found.
Dockerfile
View file @
6efab5a1
FROM
debian:stretch
FROM
alpine:3.5
ENV
RESTYABOARD_VERSION=v0.4.2 \
ENV
RESTYABOARD_VERSION=v0.4.2 \
ROOT_DIR=/usr/share/nginx/html \
ROOT_DIR=/usr/share/nginx/html \
CONF_
FILE=/etc/nginx/conf.d/restyaboard.conf
\
CONF_
DIR=/etc/nginx/conf.d
\
SMTP_DOMAIN=localhost \
SMTP_DOMAIN=localhost \
SMTP_USERNAME=root \
SMTP_USERNAME=root \
SMTP_PASSWORD=root \
SMTP_PASSWORD=root \
SMTP_SERVER=localhost \
SMTP_SERVER=localhost \
SMTP_PORT=465
SMTP_PORT=465
# update & install package
# install packages
RUN
apt-get update
&&
\
RUN
apk add
--update
\
echo
"postfix postfix/mailname string localhost"
| debconf-set-selections
&&
\
echo
"postfix postfix/main_mailer_type string 'Internet Site'"
| debconf-set-selections
&&
\
TERM
=
linux
DEBIAN_FRONTEND
=
noninteractive apt-get install
-y
\
cron
\
curl
\
curl
\
file
\
imagemagick
\
imagemagick
\
jq
\
jq
\
libpq5
\
nginx
\
nginx
\
php7.0
\
php7
\
php7.0-cli
\
php7.0-common
\
php7.0-curl
\
php7.0-fpm
\
php7.0-imagick
\
php7.0-imap
\
php7.0-ldap
\
php7.0-mbstring
\
php7.0-pgsql
\
php7.0-xml
\
postfix
\
postfix
\
postgresql-client
\
postgresql-client
\
unzip
unzip
&&
\
rm
-rf
/var/cache/apk/
*
# deploy app
# deploy app
and extensions
RUN
curl
-L
-s
-o
/tmp/restyaboard.zip https://github.com/RestyaPlatform/board/releases/download/
${
RESTYABOARD_VERSION
}
/board-
${
RESTYABOARD_VERSION
}
.zip
&&
\
RUN
curl
-L
-s
-o
/tmp/restyaboard.zip https://github.com/RestyaPlatform/board/releases/download/
${
RESTYABOARD_VERSION
}
/board-
${
RESTYABOARD_VERSION
}
.zip
&&
\
mkdir
-p
${
ROOT_DIR
}
&&
\
unzip /tmp/restyaboard.zip
-d
${
ROOT_DIR
}
&&
\
unzip /tmp/restyaboard.zip
-d
${
ROOT_DIR
}
&&
\
rm /tmp/restyaboard.zip
rm /tmp/restyaboard.zip
&&
\
curl
-L
-s
-o
/tmp/apps.json https://raw.githubusercontent.com/RestyaPlatform/board-apps/master/apps.json
&&
\
# extensions
RUN
curl
-L
-s
-o
/tmp/apps.json https://raw.githubusercontent.com/RestyaPlatform/board-apps/master/apps.json
&&
\
chmod
-R
go+w /tmp/apps.json
&&
\
chmod
-R
go+w /tmp/apps.json
&&
\
mkdir
-p
"
${
ROOT_DIR
}
/client/apps"
&&
\
mkdir
-p
"
${
ROOT_DIR
}
/client/apps"
&&
\
for
fid
in
$(
jq
-r
'.[] | .id + "-v" + .version'
/tmp/apps.json
)
;
\
for
fid
in
$(
jq
-r
'.[] | .id + "-v" + .version'
/tmp/apps.json
)
;
\
do
\
do
\
curl
-L
-s
-G
-o
/tmp/
$fid
.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/
$fid
.zip
;
\
curl
-L
-s
-G
-o
/tmp/
$fid
.zip https://github.com/RestyaPlatform/board-apps/releases/download/v1/
$fid
.zip
;
\
file /tmp/
$fid
.zip |
grep
Zip
&&
unzip /tmp/
$fid
.zip
-d
"
${
ROOT_DIR
}
/client/apps"
;
\
file /tmp/
$fid
.zip |
grep
Zip
&&
unzip /tmp/
$fid
.zip
-d
"
${
ROOT_DIR
}
/client/apps"
;
\
rm /tmp/
$fid
.zip
;
\
rm /tmp/
$fid
.zip
;
\
done
&&
\
done
&&
\
rm /tmp/apps.json
rm /tmp/apps.json
# setting app
# configure app
WORKDIR
${ROOT_DIR}
RUN
addgroup
-g
82
-S
www-data
;
\
RUN
rm /etc/nginx/sites-enabled/default
&&
\
adduser
-u
82
-D
-S
-G
www-data www-data
&&
\
cp restyaboard.conf
${
CONF_FILE
}
&&
\
mkdir
-p
${
CONF_DIR
}
&&
\
sed
-i
"s/server_name.*
$/
server_name
\"
localhost
\"
;/"
${
CONF_FILE
}
&&
\
cp
${
ROOT_DIR
}
/restyaboard.conf
${
CONF_DIR
}
&&
\
sed
-i
"s|listen 80.*
$|
listen 80;|"
${
CONF_FILE
}
&&
\
sed
-i
"s/server_name.*
$/
server_name
\"
localhost
\"
;/"
${
CONF_DIR
}
/restyaboard.conf
&&
\
sed
-i
"s|root.*html|root
${
ROOT_DIR
}
|"
${
CONF_FILE
}
&&
\
sed
-i
"s|listen 80.*
$|
listen 80;|"
${
CONF_DIR
}
/restyaboard.conf
&&
\
chown
-R
www-data:www-data
.
&&
\
sed
-i
"s|root.*html|root
${
ROOT_DIR
}
|"
${
CONF_DIR
}
/restyaboard.conf
&&
\
chmod
-R
777 media
&&
\
chown
-R
www-data:www-data
${
ROOT_DIR
}
&&
\
chmod
-R
777 client/img
&&
\
chmod
-R
777
${
ROOT_DIR
}
/media
&&
\
chmod
-R
777 tmp
chmod
-R
777
${
ROOT_DIR
}
/client/img
&&
\
chmod
-R
777
${
ROOT_DIR
}
/tmp
# cleanup
RUN
apt-get autoremove
-y
--purge
&&
\
apt-get clean
# entry
point
# entrypoint
COPY
docker-entrypoint.sh /
COPY
docker-entrypoint.sh /
RUN
chmod +x /docker-entrypoint.sh
RUN
chmod +x /docker-entrypoint.sh
WORKDIR
${ROOT_DIR}
ENTRYPOINT
["/docker-entrypoint.sh"]
ENTRYPOINT
["/docker-entrypoint.sh"]
CMD
["start"]
CMD
["start"]
docker-compose.yml
View file @
6efab5a1
...
@@ -20,12 +20,10 @@ services:
...
@@ -20,12 +20,10 @@ services:
-
SMTP_PORT=465
-
SMTP_PORT=465
depends_on
:
depends_on
:
-
postgres
-
postgres
networks
:
-
restya-net
restart
:
always
restart
:
always
postgres
:
postgres
:
image
:
postgres:9.6
image
:
kiasaki/alpine-
postgres:9.6
ports
:
ports
:
-
5432:5432
-
5432:5432
environment
:
environment
:
...
@@ -33,9 +31,4 @@ services:
...
@@ -33,9 +31,4 @@ services:
-
POSTGRES_USER=admin
-
POSTGRES_USER=admin
-
POSTGRES_PASSWORD=admin
-
POSTGRES_PASSWORD=admin
-
POSTGRES_DB=restyaboard
-
POSTGRES_DB=restyaboard
networks
:
-
restya-net
restart
:
always
restart
:
always
networks
:
restya-net
:
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