Browse Source

refactor: update docker copose aliases and names

Signed-off-by: Pranav C Balan <pranavxc@gmail.com>
pull/272/head
Pranav C Balan 4 years ago
parent
commit
9ff70334a6
  1. 8
      docker-compose/mssql/docker-compose.yml
  2. 12
      docker-compose/mysql/docker-compose.yml
  3. 10
      docker-compose/pg/docker-compose.yml

8
docker-compose/mssql/docker-compose.yml

@ -1,7 +1,7 @@
version: '3.3' version: '3.3'
services: services:
xcdb: root_db:
image: mcr.microsoft.com/mssql/server:2017-latest image: mcr.microsoft.com/mssql/server:2017-latest
restart: always restart: always
volumes: volumes:
@ -16,9 +16,9 @@ services:
retries: 10 retries: 10
start_period: 10s start_period: 10s
xc: nocodb:
depends_on: depends_on:
xcdb: root_db:
condition: service_healthy condition: service_healthy
image: nocodb/nocodb:latest image: nocodb/nocodb:latest
ports: ports:
@ -28,6 +28,6 @@ services:
- "8083:8083" - "8083:8083"
restart: always restart: always
environment: environment:
NC_DB: "mssql://xcdb:1433?u=sa&p=Password123.&d=xcdb" NC_DB: "mssql://root_db:1433?u=sa&p=Password123.&d=root_db"
volumes: volumes:
db_data: {} db_data: {}

12
docker-compose/mysql/docker-compose.yml

@ -1,24 +1,24 @@
version: '3.3' version: '3.3'
services: services:
xcdb: root_db:
image: mysql:5.7 image: mysql:5.7
volumes: volumes:
- db_data:/var/lib/mysql - db_data:/var/lib/mysql
restart: always restart: always
environment: environment:
MYSQL_ROOT_PASSWORD: password MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: xcdb MYSQL_DATABASE: root_db
MYSQL_USER: xc MYSQL_USER: noco
MYSQL_PASSWORD: password MYSQL_PASSWORD: password
healthcheck: healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ] test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s timeout: 20s
retries: 10 retries: 10
xc: nocodb:
depends_on: depends_on:
xcdb: root_db:
condition: service_healthy condition: service_healthy
image: nocodb/nocodb:latest image: nocodb/nocodb:latest
ports: ports:
@ -28,6 +28,6 @@ services:
- "8083:8083" - "8083:8083"
restart: always restart: always
environment: environment:
NC_DB: "mysql2://xcdb:3306?u=xc&p=password&d=xcdb" NC_DB: "mysql2://root_db:3306?u=noco&p=password&d=root_db"
volumes: volumes:
db_data: {} db_data: {}

10
docker-compose/pg/docker-compose.yml

@ -1,7 +1,7 @@
version: '3.3' version: '3.3'
services: services:
xcdb: root_db:
image: postgres image: postgres
restart: always restart: always
volumes: volumes:
@ -9,15 +9,15 @@ services:
environment: environment:
POSTGRES_PASSWORD: password POSTGRES_PASSWORD: password
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_DB: xcdb POSTGRES_DB: root_db
healthcheck: healthcheck:
test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"
interval: 10s interval: 10s
timeout: 2s timeout: 2s
retries: 10 retries: 10
xc: nocodb:
depends_on: depends_on:
xcdb: root_db:
condition: service_healthy condition: service_healthy
image: nocodb/nocodb:latest image: nocodb/nocodb:latest
ports: ports:
@ -27,6 +27,6 @@ services:
- "8083:8083" - "8083:8083"
restart: always restart: always
environment: environment:
NC_DB: "pg://xcdb:5432?u=postgres&p=password&d=xcdb" NC_DB: "pg://root_db:5432?u=postgres&p=password&d=root_db"
volumes: volumes:
db_data: {} db_data: {}
Loading…
Cancel
Save