Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cozy Stack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
Cozy Stack
Commits
f61320db
Commit
f61320db
authored
8 years ago
by
Pierre Guilleminot
Browse files
Options
Downloads
Patches
Plain Diff
rename script to cozy-app-dev
parent
f580ad1d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/Dockerfile
+21
-18
21 additions, 18 deletions
scripts/Dockerfile
scripts/cozy-app-dev.sh
+3
-3
3 additions, 3 deletions
scripts/cozy-app-dev.sh
with
24 additions
and
21 deletions
scripts/Dockerfile
+
21
−
18
View file @
f61320db
...
...
@@ -12,6 +12,7 @@ ENV GOLANG_VERSION 1.7.3
ENV
GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
ENV
GOLANG_DOWNLOAD_SHA256 508028aac0654e993564b6e2014bf2d4a9751e3b286661b0b0040046cf18028e
# CouchDB and CGo dependencies
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
git
\
...
...
@@ -30,20 +31,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config
\
&&
rm
-rf
/var/lib/apt/lists/
*
# CouchDB
RUN
mkdir
/usr/src/couchdb
\
&&
curl
-fsSL
"
$COUCHDB_SRC_URL
"
-o
couchdb.tar.gz
\
&&
echo
"
$COUCHDB_SRC_SHA256
couchdb.tar.gz"
|
sha256sum
-c
-
\
&&
tar
-xzf
couchdb.tar.gz
-C
/usr/src/couchdb
--strip-components
=
1
\
&&
rm
couchdb.tar.gz
\
&&
cd
/usr/src/couchdb
\
&&
./configure
--disable-docs
\
&&
make release
\
&&
mv
./rel/couchdb /usr/local
\
&&
printf
"[httpd]
\n
port = 5984
\n
bind_address = 127.0.0.1
\n
"
\
>
/usr/local/couchdb/etc/local.ini
ENV
PATH $PATH:/usr/local/couchdb/bin
# Go
RUN
curl
-fsSL
"
$GOLANG_DOWNLOAD_URL
"
-o
golang.tar.gz
\
...
...
@@ -59,6 +46,21 @@ RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
RUN
go get github.com/mholt/caddy/caddy
\
&&
go get github.com/cozy/cozy-stack
# CouchDB
RUN
mkdir
/usr/src/couchdb
\
&&
curl
-fsSL
"
$COUCHDB_SRC_URL
"
-o
couchdb.tar.gz
\
&&
echo
"
$COUCHDB_SRC_SHA256
couchdb.tar.gz"
|
sha256sum
-c
-
\
&&
tar
-xzf
couchdb.tar.gz
-C
/usr/src/couchdb
--strip-components
=
1
\
&&
rm
couchdb.tar.gz
\
&&
cd
/usr/src/couchdb
\
&&
./configure
--disable-docs
\
&&
make release
\
&&
mv
./rel/couchdb /usr/local
ENV
PATH $PATH:/usr/local/couchdb/bin
# Cleanup
RUN
apt-get purge
-y
\
erlang-dev
\
...
...
@@ -68,8 +70,9 @@ RUN apt-get purge -y \
&&
apt-get clean
\
&&
rm
-rf
/usr/src/couchdb
COPY
app-dev.sh /usr/bin
RUN
chmod
+x /usr/bin/app-dev.sh
COPY
cozy-app-dev.sh /usr/bin
RUN
chmod
+x /usr/bin/cozy-app-dev.sh
ENV
COZY_PROXY_HOST cozy.local
ENV
COZY_PROXY_PORT 8080
...
...
@@ -78,7 +81,7 @@ ENV COZY_STACK_PORT 8081
RUN
mkdir
-p
/data/cozy-app
EXPOSE
$COZY_PROXY_PORT
EXPOSE
8080 5984
ENTRYPOINT
["/usr/bin/app-dev.sh"]
ENTRYPOINT
["/usr/bin/
cozy-
app-dev.sh"]
CMD
["-d /data/cozy-app"]
This diff is collapsed.
Click to expand it.
scripts/app-dev.sh
→
scripts/
cozy-
app-dev.sh
+
3
−
3
View file @
f61320db
...
...
@@ -102,7 +102,7 @@ cleanup() {
pid
=
`
cat
"
${
pidfile
}
"
`
if
[
-n
"
${
pid
}
"
]
;
then
echo
"stopping couchdb"
kill
-9
${
pid
}
2
>&1
>
/dev/null
||
true
kill
-9
${
pid
}
2>/dev/null
||
true
fi
rm
"
${
pidfile
}
"
done
...
...
@@ -147,7 +147,7 @@ do_start_couchdb() {
couch_pid
=
`
mktemp
-t
cozy-stack-dev.couch.XXXX
`
||
exit
1
trap
cleanup EXIT
couchdb 2>
&1
>
/dev/null
couchdb 2>
/dev/null 1>
/dev/null
&
echo
${
!
}
>
${
couch_pid
}
wait_for
"
${
COUCHDB_HOST
}
:
${
COUCHDB_PORT
}
"
"couchdb"
echo
"ok"
...
...
@@ -207,7 +207,7 @@ app.${COZY_PROXY_HOST} { \n\
wait_for
()
{
i
=
"0"
while
!
curl
-s
--max-time
1
-XGET
${
1
}
>
/dev/null
;
do
sleep
0.5
sleep
1
i
=
$((
i+1
))
if
[
"
${
i
}
"
-gt
"10"
]
;
then
echo_err
"could not listen to
${
2
}
on
${
1
}
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment