diff --git a/docker-compose.yaml b/docker-compose.yaml index 11bfc8a..3ad24c7 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,22 +2,22 @@ version: '3.7' services: - db: - image: postgres:11 - volumes: - - ./${DATABASE_DATA_DIR}:${DATABASE_DATA_DIR_IN_CONTAINER} - container_name: ${DB_CONTAINER} - user: ${USER}:${GROUP} - environment: - # postgres data dir - - PGDATA=${DATABASE_DATA_DIR_IN_CONTAINER} - # postgres user - - POSTGRES_USER=postgres + # db: + # image: postgres:11 + # volumes: + # - ./${DATABASE_DATA_DIR}:${DATABASE_DATA_DIR_IN_CONTAINER} + # container_name: ${DB_CONTAINER} + # user: ${USER}:${GROUP} + # environment: + # # postgres data dir + # - PGDATA=${DATABASE_DATA_DIR_IN_CONTAINER} + # # postgres user + # - POSTGRES_USER=postgres # eoa-django webserver: - depends_on: - - db + # depends_on: + # - db build: . image: ${WEB_SERVER_IMAGE} container_name: ${WEB_SERVER_CONTAINER} diff --git a/scripts/config/env_default.conf b/scripts/config/env_default.conf index 4d45193..6dc8aec 100644 --- a/scripts/config/env_default.conf +++ b/scripts/config/env_default.conf @@ -13,8 +13,8 @@ DEPENDENCIES_DIR=dependencies RUNTIME_DIR=runtime_data -DATABASE_DATA_DIR=${RUNTIME_DIR}/postgres_data -DATABASE_DATA_DIR_IN_CONTAINER=/eoa/postgres_data +# DATABASE_DATA_DIR=${RUNTIME_DIR}/postgres_data +# DATABASE_DATA_DIR_IN_CONTAINER=/eoa/postgres_data SRC_DIR=src SRC_DIR_IN_CONTAINER=/eoa/server diff --git a/scripts/init.py b/scripts/init.py index 8b30523..031484a 100755 --- a/scripts/init.py +++ b/scripts/init.py @@ -39,9 +39,9 @@ def create_dirs( config ): BASE_DIR / config['RES_DIR'] / "static/custom_static" ) - create_dir( - BASE_DIR / config['DATABASE_DATA_DIR'] - ) + # create_dir( + # BASE_DIR / config['DATABASE_DATA_DIR'] + # ) """ this extra copy is necessary in order to diff --git a/src/eoa/settings.py b/src/eoa/settings.py index 14f7f4a..a889b7a 100644 --- a/src/eoa/settings.py +++ b/src/eoa/settings.py @@ -127,11 +127,18 @@ DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.postgresql', - 'NAME': 'postgres', - 'USER': 'postgres', - 'HOST': 'db', - 'PORT': '5432', + 'CONN_MAX_AGE': 0, + 'ENGINE': 'django.db.backends.sqlite3', + 'HOST': 'localhost', + 'NAME': 'project.db', + 'PASSWORD': '', + 'PORT': '', + 'USER': '' + # 'ENGINE': 'django.db.backends.postgresql', + # 'NAME': 'postgres', + # 'USER': 'postgres', + # 'HOST': 'db', + # 'PORT': '5432', } } diff --git a/src/project.db b/src/project.db new file mode 100644 index 0000000..b3d495f Binary files /dev/null and b/src/project.db differ