fix ports in project.env nd docker-compose.yml

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-07-04 13:03:32 +02:00
parent af08628c74
commit d9fc36e6f8
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
3 changed files with 34 additions and 35 deletions

View File

@ -1,31 +1,30 @@
version: "3.8"
services:
db:
image: postgres:14
restart: always
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-passwd}
POSTGRES_DB: db
PGDATABASE: db
PGPASSWORD: ${POSTGRES_PASSWORD:-passwd}
PGUSER: ${POSTGRES_USER:-postgres}
ports:
- 127.0.0.1:${LOCAL_DB_PORT:-15432}:5432
app:
build: .
# restart: always
command: sh ./start_server.sh
environment:
APP_ENV: production
depends_on:
- db
ports:
- 127.0.0.1:${LOCAL_WEB_PORT:-8000}:8000
volumes:
db_data:
version: "3.8"
services:
db:
image: postgres:14
restart: always
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-passwd}
POSTGRES_DB: db
PGDATABASE: db
PGPASSWORD: ${POSTGRES_PASSWORD:-passwd}
PGUSER: ${POSTGRES_USER:-postgres}
ports:
- '127.0.0.1:${LOCAL_DB_PORT:-15432}:5432'
app:
build: .
# restart: always
command: sh ./start_server.sh
env_file: ./project.env
depends_on:
- db
ports:
- '127.0.0.1:${LOCAL_WEB_PORT:-8000}:${LOCAL_WEB_PORT:-8000}'
volumes:
db_data:

View File

@ -1,8 +1,9 @@
# Put environment variables that hold sensitive data such as passwords here.
# NOTE: This file will not be placed under version control.
APP_ENV=production
APP_NAME=Open Law
SERVER_NAME=127.0.0.1:5006
SERVER_NAME=127.0.0.1:8000
SECRET_KEY=set_here_secret
# Database
@ -17,8 +18,7 @@ DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGR
DEVEL_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@127.0.0.1:${LOCAL_DB_PORT}/${POSTGRES_DB}
# WEB app
LOCAL_WEB_PORT=8080
LOCAL_WEB_PORT=8000
# Super admin
ADMIN_USERNAME=admin

View File

@ -4,4 +4,4 @@ poetry run flask db upgrade
# echo Run app
# flask run -h 0.0.0.0
echo Run app server
poetry run gunicorn -w 4 -b 0.0.0.0 'wsgi:app' $@
poetry run gunicorn -w 4 -b "0.0.0.0:$LOCAL_WEB_PORT" 'wsgi:app' $@