mazalqk
This commit is contained in:
commit
61d9c4bee1
|
@ -8,7 +8,7 @@ Uses the default Flask development server.
|
|||
1. Build the images and run the containers:
|
||||
|
||||
```sh
|
||||
$ docker-compose up -d --build
|
||||
$ docker-compose -f docker-compose.dev.yml up -d --build
|
||||
```
|
||||
|
||||
Test it out at [http://localhost:5000](http://localhost:5000). The "web" folder is mounted into the container and your code changes apply automatically.
|
||||
|
@ -18,10 +18,11 @@ Uses the default Flask development server.
|
|||
Uses gunicorn + nginx.
|
||||
|
||||
1. Rename *.env.prod-sample* to *.env.prod* and *.env.prod.db-sample* to *.env.prod.db*. Update the environment variables.
|
||||
1. Build the images and run the containers:
|
||||
2. run osmtile with import script
|
||||
2. Build the images and run the containers:
|
||||
|
||||
```sh
|
||||
$ docker-compose -f docker-compose.prod.yml up -d --build
|
||||
$ docker-compose up -d --build
|
||||
```
|
||||
|
||||
Test it out at [http://localhost:1337](http://localhost:1337). No mounted folders. To apply changes, the image must be re-built.
|
||||
|
|
|
@ -11,6 +11,8 @@ services:
|
|||
- "./lb:/usr/local/etc/haproxy"
|
||||
depends_on:
|
||||
- "certbot"
|
||||
- "flask"
|
||||
- "osmtile"
|
||||
restart: always
|
||||
networks:
|
||||
- internal
|
||||
|
@ -59,7 +61,7 @@ services:
|
|||
- "DOWNLOAD_PBF=https://download.geofabrik.de/europe/bulgaria-latest.osm.pbf"
|
||||
- "DOWNLOAD_POLY=https://download.geofabrik.de/europe/bulgaria.poly"
|
||||
volumes:
|
||||
- "./data/osmtile/pgdata:/var/lib/postgresql/data/"
|
||||
- "./data/osmtile/pgdata:/var/lib/postgresql/12/main"
|
||||
networks:
|
||||
- internal
|
||||
#entrypoint: "/run.sh import"
|
||||
|
|
|
@ -31,7 +31,10 @@ sys.stderr.flush()
|
|||
|
||||
app = Flask(__name__)
|
||||
app.config.from_object("forest.config.Config")
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
>>>>>>> 830f996d6068222f74a4460d104568313b8d4434
|
||||
db = SQLAlchemy(app)
|
||||
#db = SQLAlchemy(session_options = { "autoflush": False })
|
||||
db.init_app(app)
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import subprocess, shlex
|
||||
from forest import app, db, User
|
||||
|
||||
from flask.cli import FlaskGroup
|
||||
from forest import app, db, User
|
||||
|
||||
from flask_migrate import Migrate
|
||||
from flask_migrate import MigrateCommand
|
||||
|
||||
cli = FlaskGroup(app)
|
||||
migrate = Migrate(app, db)
|
||||
|
||||
cli.add_command('db', MigrateCommand)
|
||||
|
||||
migrate = Migrate()
|
||||
migrate.init_app(app, db)
|
||||
|
||||
@cli.command("create_db")
|
||||
def create_db():
|
||||
|
|
|
@ -1,4 +1,18 @@
|
|||
Flask==1.1.2
|
||||
Flask-SQLAlchemy==2.5.1
|
||||
gunicorn==20.1.0
|
||||
psycopg2-binary==2.8.6
|
||||
gunicorn
|
||||
psycopg2-binary
|
||||
alembic
|
||||
Babel
|
||||
Flask
|
||||
Flask-SQLAlchemy
|
||||
Flask-Admin
|
||||
Flask-Babel
|
||||
Flask-Bootstrap
|
||||
Flask-Login
|
||||
Flask-Mail
|
||||
Flask-Migrate
|
||||
Flask-Moment
|
||||
Flask-Uploads
|
||||
Flask-WTF
|
||||
Jinja2
|
||||
PyQRCode
|
||||
WTForms
|
||||
|
|
|
@ -59,7 +59,7 @@ frontend https
|
|||
|
||||
use_backend %[req.hdr(Host),lower]
|
||||
|
||||
backend map.forest.deflax.net
|
||||
backend map.deflax.net
|
||||
# Get from cache / put in cache
|
||||
http-request cache-use mapscache
|
||||
http-response cache-store mapscache
|
||||
|
@ -70,7 +70,7 @@ backend forest.deflax.net
|
|||
# server list
|
||||
server s1 flask:5000 check
|
||||
|
||||
#backend swagger.deflax.net
|
||||
#backend docs.deflax.net
|
||||
# # server list
|
||||
# server s1 swagger:80 check
|
||||
|
||||
|
|
Loading…
Reference in a new issue