More testing:
Next step, restart Wappler, open the project settings, no database listed and no docker database running in Docker so all good.
The "save" button works, nice green message.
Here are the settings:
So, select a Docker/Postgres database and check "No Sample Data":
Click save and get the green messages, so deploy Docker to start the database container:
Close the project settings.
Open the project settings and see the following (note, no database details shown):
Looking at he docker-compose.yml in .wappler it has the database info (this is a test project which will be deleted soon):
services:
web:
volumes:
- '../../../app:/opt/node_app/app'
- '../../../lib:/opt/node_app/lib'
- '../../../views:/opt/node_app/views'
- '../../../public:/opt/node_app/public'
- '../../../extensions:/opt/node_app/extensions'
- '../../../db:/opt/node_app/db'
- '../../../certs:/opt/node_app/certs'
ports:
- '8100:3000'
restart: 'always'
stdin_open: true
tty: true
build:
context: '../../../'
dockerfile: '.wappler/targets/Development/web/Dockerfile'
logging:
options:
max-file: '5'
max-size: '10m'
depends_on:
- 'db'
db:
image: 'postgres:14.8'
environment:
POSTGRES_PASSWORD: 'yVoKB3Cz'
POSTGRES_USER: 'db_user'
POSTGRES_DB: 'asa-forms'
volumes:
- './db_init:/docker-entrypoint-initdb.d'
ports:
- '9906:5432'
restart: 'always'
logging:
options:
max-file: '5'
max-size: '10m'
But in the project.json, no database info:
{
"projectName": "asa-forms",
"styleFile": "/css/style.css",
"assetsFolder": "/assets",
"designFramework": "bootstrap5",
"frameworks": [
{
"name": "fontawesome_5",
"type": "cdn"
},
{
"name": "bootstrap5",
"type": "local"
},
{
"name": "appConnect",
"type": "local"
}
],
"hostingType": "docker",
"projectServerModel": "node",
"runtime": "capacitor",
"webRootFolder": "/public",
"useRouting": true,
"addBase": true,
"routingHandler": "node",
"projectLinksType": "site",
"targets": [
{
"name": "Development",
"remoteURL": "http://localhost:8100",
"webServerPort": 8100,
"webServerLang": "node",
"targetType": "docker",
"webServer": "node",
"NodeVersion": "18",
"NodeOS": "bullseye",
"NodeImageType": "slim",
"webLoggingMaxFiles": "5",
"webLoggingMaxFileSize": "10m",
"dockerTimezone": "Europe/London",
"databaseConnectionType": "none"
}
],
"activeTarget": "Development",
"projectType": "web",
"extensions": []
}
Very strange.