Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
david Chavalarias
clinicaltrials
Commits
f9d3a3ad
Commit
f9d3a3ad
authored
Nov 24, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update docs
parent
77f6e167
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
14 deletions
+23
-14
README.md
README.md
+20
-14
1-create_sql_container.md
setup/dockers/1-create_sql_container.md
+3
-0
No files found.
README.md
View file @
f9d3a3ad
...
...
@@ -19,27 +19,31 @@ More info in `doc/` directory
First we need to run the app
```
# install prerequisites
> sudo apt install python3
> sudo apt install python3-virtualenv
> sudo apt install python3 docker jq
# start a virtualenv
> virtualenv --python=/usr/bin/python3 setup/regcomex_venv
> source setup/regcomex_venv/bin/activate
cd $INSTALL_DIR
# additional requirements
(regcomex_venv) > pip3 install -r setup/requirements.txt
# run the database docker
docker run --detach --name comex_db \
-v $INSTALL_DIR/data/shared_mysql_data:/var/lib/mysql \
--env="MYSQL_ROOT_PASSWORD=very-safe-pass" mysql
# run the app ----------------------------------------------------------
(regcomex_venv) > gunicorn -b 127.0.0.1:9090 server_comex_registration:app
# ----------------------------------------------------------
```
# get its IP into the env
export SQLDOCKERIP=$(docker inspect comex_db | jq -r '.[0].NetworkSettings.IPAddress')
# run the app --------------------------------------------
gunicorn -b 127.0.0.1:9090 server_comex_registration:app
# -------------------------------------------------------
```
The form server is now accessible locally on
`127.0.0.1:9090/regcomex`
(the default ROUTE_PREFIX is /regcomex, but TODO can be changed in config file)
**Remarks:**
-
the default ROUTE_PREFIX is /regcomex, but TODO can be changed in config file
-
the mysql DB needs to be
[
built first
](
https://github.com/moma/regcomex/blob/master/setup/dockers/1-create_sql_container.md
)
, but TODO automatize
-------
#### Running via docker
#### Running
it all
via docker
Prerequisites:
-
`docker`
-
`docker-compose`
(>= v. 1.7.0)
...
...
@@ -51,15 +55,17 @@ docker build flask_ispcif_light/ -t flask_ispcif_light:latest
docker run -p 9090 --name comex_flask_test flask_ispcif_light
# run the app + mysql (TODO actually use mysql!)
docker-compose up
```
-------
#### Running in prod
TODO
Secondly we ask nginx to reverse-proxy our app
This is a minimal conf (cf
[
detailed doc
](
https://github.com/moma/regcomex/blob/master/doc/nginx_conf.md
)
for real-life conf)
```
# nginx exemple
server {
...
...
setup/dockers/1-create_sql_container.md
View file @
f9d3a3ad
...
...
@@ -21,6 +21,9 @@ export SQLDOCKERIP=$(docker inspect comex_db | jq -r '.[0].NetworkSettings.IPAdd
mysql -uroot -pvery-safe-pass -h $SQLDOCKERIP -P 3306
# -----------------------------------------------------
# stop it when you're done
docker stop comex_db
# NB
# also now mysqld --initilize created the following files
...
...
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