diff options
| -rw-r--r-- | compose.yaml | 17 | ||||
| -rw-r--r-- | database/init_scripts/create_table.sql (renamed from database/create_table.sql) | 0 |
2 files changed, 10 insertions, 7 deletions
diff --git a/compose.yaml b/compose.yaml index 21f3cea..c5102e4 100644 --- a/compose.yaml +++ b/compose.yaml @@ -29,21 +29,18 @@ services: - mosquitto depends_on: - mosquitto - - postgres: image: postgres:13 container_name: postgres - ports: - - 5432:5432 + networks: + - database environment: POSTGRES_PASSWORD: public POSTGRES_USER: root POSTGRES_DB: control_station volumes: - - $PWD/database/create-table.sql:/docker-entrypoint-initdb.d/init.sql - - + - ${PWD}/database/init_scripts:/docker-entrypoint-initdb.d + - db_data:/var/lib/postgresql/data pgadmin: image: dpage/pgadmin4 container_name: pgadmin @@ -52,7 +49,13 @@ services: - PGADMIN_DEFAULT_PASSWORD=admin ports: - "5050:80" + networks: + - database depends_on: - postgres networks: mosquitto: + database: + +volumes: + db_data: diff --git a/database/create_table.sql b/database/init_scripts/create_table.sql index 8ee801a..8ee801a 100644 --- a/database/create_table.sql +++ b/database/init_scripts/create_table.sql |
