Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
b82201de
Commit
b82201de
authored
7 years ago
by
furion
Browse files
Options
Downloads
Patches
Plain Diff
fix
#1
, service boilerplate
parent
09751ec8
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+68
-9
68 additions, 9 deletions
Dockerfile
server/server.py
+6
-0
6 additions, 0 deletions
server/server.py
service/web/run
+11
-0
11 additions, 0 deletions
service/web/run
with
85 additions
and
9 deletions
Dockerfile
+
68
−
9
View file @
b82201de
FROM
python:3.5.3
FROM
phusion/baseimage:0.9.19
MAINTAINER
furion <furion@steemit.com>
COPY
. /src
#ENV MYSQL_URL mysql://
WORKDIR
/src
ENV
ENVIRONMENT DEV
ENV
LOG_LEVEL INFO
ENV
LANG en_US.UTF-8
ENV
LC_ALL en_US.UTF-8
ENV
APP_ROOT /app
ENV
WSGI_APP ${APP_ROOT}/hive/server/serve.py
ENV
HTTP_SERVER_PORT 8080
RUN
pip
install
ipython
RUN
\
#RUN pip install -r dev-requirements.txt
apt-get update
&&
\
RUN
pip
install
-e
.
apt-get
install
-y
\
build-essential
\
daemontools
\
git
\
libffi-dev
\
libmysqlclient-dev
\
libssl-dev
\
make
\
python3
\
python3-dev
\
python3-pip
\
libxml2-dev
\
libxslt-dev
\
runit
\
nginx
EXPOSE
5000
#CMD ["python", "app.py"]
RUN
\
\ No newline at end of file
mkdir
-p
/var/lib/nginx/body
&&
\
mkdir
-p
/var/lib/nginx/scgi
&&
\
mkdir
-p
/var/lib/nginx/uwsgi
&&
\
mkdir
-p
/var/lib/nginx/fastcgi
&&
\
mkdir
-p
/var/lib/nginx/proxy
&&
\
chown
-R
www-data:www-data /var/lib/nginx
&&
\
mkdir
-p
/var/log/nginx
&&
\
touch
/var/log/nginx/access.log
&&
\
touch
/var/log/nginx/error.log
&&
\
chown
www-data:www-data /var/log/nginx/
*
.log
&&
\
touch
/var/run/nginx.pid
&&
\
chown
www-data:www-data /var/run/nginx.pid
ADD
. /app
RUN
\
mv
/app/service/
*
/etc/service
&&
\
chmod
+x /etc/service/
*
/run
WORKDIR
/app
RUN
\
pip3
install
--upgrade
pip
&&
\
pip3
install
pipenv
&&
\
pipenv lock
&&
\
pipenv
install
--three
--dev
&&
\
apt-get remove
-y
\
build-essential
\
libffi-dev
\
libssl-dev
&&
\
apt-get autoremove
-y
&&
\
rm
-rf
\
/root/.cache
\
/var/lib/apt/lists/
*
\
/tmp/
*
\
/var/tmp/
*
\
/var/cache/
*
\
/usr/include
\
/usr/local/include
EXPOSE
${HTTP_SERVER_PORT}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
server/server.py
0 → 100644
+
6
−
0
View file @
b82201de
def
create_app
():
pass
if
__name__
==
'
__main__
'
:
pass
This diff is collapsed.
Click to expand it.
service/web/run
0 → 100644
+
11
−
0
View file @
b82201de
#!/bin/bash
exec
setuidgid nobody uwsgi
\
--master
\
--http
:
"
${
HTTP_SERVER_PORT
}
"
\
--wsgi-file
"
${
WSGI_APP
}
"
\
--processes
"
${
HTTP_SERVER_PROCESSES
:-
8
}
"
\
--threads
"
${
HTTP_SERVER_THREADS
:-
1
}
"
\
--stats
0.0.0.0:
"
${
HTTP_SERVER_STATS_PORT
}
"
\
--stats-http
\ No newline at end of file
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