added postgres to docker for later integration
This commit is contained in:
parent
58406828ee
commit
9b3c0b06c5
|
@ -5,5 +5,11 @@ __pycache__
|
|||
config
|
||||
config.h
|
||||
|
||||
# env files
|
||||
postgres.env
|
||||
|
||||
# frontend font files
|
||||
*.ttf
|
||||
*.ttf
|
||||
|
||||
# dynamic files
|
||||
**/dyn/*.json
|
|
@ -1,7 +1,11 @@
|
|||
#!/bin/bash
|
||||
# upload project to vps2
|
||||
|
||||
# get last dyn
|
||||
wget data.lpb-air.com --output-document=backend/flask/dyn/air.json
|
||||
|
||||
rsync --progress -a docker-compose.yml vps2:docker/
|
||||
rsync --progress -a env vps2:docker/
|
||||
rsync --progress -a --delete-after \
|
||||
--exclude dyn --exclude config.sample --exclude __pychache__ \
|
||||
backend vps2:docker/
|
||||
|
|
|
@ -51,6 +51,17 @@ services:
|
|||
- LETSENCRYPT_HOST=data.lpb-air.com
|
||||
expose:
|
||||
- "80"
|
||||
# backend postgres
|
||||
postgres:
|
||||
image: postgres
|
||||
container_name: postgres
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volume/postgres:/var/lib/postgresql/data/
|
||||
env_file:
|
||||
- ./env/postgres.env
|
||||
expose:
|
||||
- "5432"
|
||||
# php fast-cgi
|
||||
php:
|
||||
image: php:7-fpm
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
POSTGRES_USER=aqi
|
||||
POSTGRES_PASSWORD=aaaaaaaaaaaaaaaaa
|
||||
POSTGRES_DB=aqi
|
Loading…
Reference in New Issue