mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-17 11:17:46 +00:00
13
.codesandbox/servers.json
Normal file
13
.codesandbox/servers.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Servers": {
|
||||
"dev": {
|
||||
"Name": "PostgSail dev db",
|
||||
"Group": "Servers",
|
||||
"Port": 5432,
|
||||
"Host": "172.30.0.2",
|
||||
"SSLMode": "prefer",
|
||||
"MaintenanceDB": "postgres",
|
||||
"Username": "postgres"
|
||||
}
|
||||
}
|
||||
}
|
104
.codesandbox/tasks.json
Normal file
104
.codesandbox/tasks.json
Normal file
@@ -0,0 +1,104 @@
|
||||
{
|
||||
// These tasks will run in order when initializing your CodeSandbox project.
|
||||
"setupTasks": [
|
||||
{
|
||||
"name": "git udpate",
|
||||
"command": "cd ~/workspace/ && git pull"
|
||||
},
|
||||
{
|
||||
"name": "git udpate submodule",
|
||||
"command": "cd ~/workspace/ && git submodule update --recursive --remote"
|
||||
}
|
||||
],
|
||||
|
||||
// These tasks can be run from CodeSandbox. Running one will open a log in the app.
|
||||
"tasks": {
|
||||
"docker-compose up db": {
|
||||
"name": "docker-compose up db",
|
||||
"command": "docker-compose up db",
|
||||
"runAtStart": true
|
||||
},
|
||||
"docker network inspect network": {
|
||||
"name": "docker network inspect postgsail_iot",
|
||||
"command": "docker network ls && docker network inspect postgsail_iot",
|
||||
"runAtStart": false
|
||||
},
|
||||
"docker-compose up api": {
|
||||
"name": "docker-compose up api",
|
||||
"command": "docker-compose up api",
|
||||
"runAtStart": false,
|
||||
"preview": {
|
||||
"port": 3000,
|
||||
"prLink": "direct"
|
||||
}
|
||||
},
|
||||
"docker volume rm volume": {
|
||||
"name": "docker volume rm volume",
|
||||
"command": "docker volume ls && docker volume rm postgsail_data",
|
||||
"runAtStart": false
|
||||
},
|
||||
"docker-compose rm db": {
|
||||
"name": "docker-compose rm db",
|
||||
"command": "docker-compose rm db",
|
||||
"runAtStart": false
|
||||
},
|
||||
"docker-compose rm api": {
|
||||
"name": "docker-compose rm api",
|
||||
"command": "docker-compose rm api",
|
||||
"runAtStart": false
|
||||
},
|
||||
"docker-compose clean": {
|
||||
"name": "docker-compose clean",
|
||||
"command": "docker-compose stop && docker-compose rm && docker volume ls && docker volume rm postgsail_data",
|
||||
"runAtStart": false
|
||||
},
|
||||
"docker-compose pgadmin": {
|
||||
"name": "docker-compose up pgadmin",
|
||||
"command": "docker-compose up pgadmin",
|
||||
"runAtStart": false,
|
||||
"preview": {
|
||||
"port": 5050,
|
||||
"prLink": "direct"
|
||||
}
|
||||
},
|
||||
"docker-compose web": {
|
||||
"name": "docker-compose up web",
|
||||
"command": "docker-compose up web",
|
||||
"runAtStart": false,
|
||||
"preview": {
|
||||
"port": 8080,
|
||||
"prLink": "direct"
|
||||
}
|
||||
},
|
||||
"docker-compose ps": {
|
||||
"name": "docker-compose ps -a",
|
||||
"command": "docker-compose ps -a",
|
||||
"runAtStart": false
|
||||
},
|
||||
"docker ps": {
|
||||
"name": "docker ps -a",
|
||||
"command": "docker ps -a",
|
||||
"runAtStart": false
|
||||
},
|
||||
"docker-compose stop": {
|
||||
"name": "docker-compose stop",
|
||||
"command": "docker-compose stop",
|
||||
"runAtStart": false
|
||||
},
|
||||
"npm i": {
|
||||
"name": "npm i",
|
||||
"command": "cd frontend/ && npm i",
|
||||
"runAtStart": false
|
||||
},
|
||||
"git submodule add https://github.com/xbgmsharp/vuestic-postgsail frontend": {
|
||||
"name": "git submodule add https://github.com/xbgmsharp/vuestic-postgsail frontend",
|
||||
"command": "git submodule add https://github.com/xbgmsharp/vuestic-postgsail frontend",
|
||||
"runAtStart": false
|
||||
},
|
||||
"git pull": {
|
||||
"name": "git pull",
|
||||
"command": "git pull",
|
||||
"runAtStart": false
|
||||
}
|
||||
}
|
||||
}
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "frontend"]
|
||||
path = frontend
|
||||
url = https://github.com/xbgmsharp/vuestic-postgsail
|
@@ -4,18 +4,24 @@ services:
|
||||
image: xbgmsharp/timescaledb-postgis
|
||||
container_name: db
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
#env_file: .env
|
||||
environment:
|
||||
- POSTGRES_DB=postgres
|
||||
- TIMESCALEDB_TELEMETRY=off
|
||||
- PGDATA=/var/lib/postgresql/data/pgdata
|
||||
- TZ=UTC
|
||||
network_mode: "host"
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
- PGSAIL_AUTHENTICATOR_PASSWORD=${PGSAIL_AUTHENTICATOR_PASSWORD}
|
||||
#network_mode: "host"
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- data:/var/lib/postgresql/data
|
||||
- ./db-data:/var/lib/postgresql/data
|
||||
- $PWD/initdb:/docker-entrypoint-initdb.d
|
||||
networks:
|
||||
iot:
|
||||
ipv4_address: 172.30.0.2
|
||||
logging:
|
||||
options:
|
||||
max-size: 10m
|
||||
@@ -32,13 +38,17 @@ services:
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
env_file: .env
|
||||
#env_file: .env
|
||||
environment:
|
||||
PGRST_DB_SCHEMA: api
|
||||
PGRST_DB_ANON_ROLE: api_anonymous
|
||||
PGRST_OPENAPI_SERVER_PROXY_URI: http://127.0.0.1:3000
|
||||
PGRST_DB_PRE_REQUEST: public.check_jwt
|
||||
network_mode: "host"
|
||||
PGRST_DB_URI: ${PGRST_DB_URI}
|
||||
PGRST_JWT_SECRET: ${PGRST_JWT_SECRET}
|
||||
networks:
|
||||
iot:
|
||||
ipv4_address: 172.30.0.3
|
||||
depends_on:
|
||||
- db
|
||||
logging:
|
||||
@@ -61,8 +71,8 @@ services:
|
||||
- $PWD/grafana:/etc/grafana
|
||||
ports:
|
||||
- "3001:3000"
|
||||
network_mode: "host"
|
||||
env_file: .env
|
||||
networks:
|
||||
- iot
|
||||
environment:
|
||||
- GF_INSTALL_PLUGINS=pr0ps-trackmap-panel,fatcloud-windrose-panel
|
||||
- GF_USERS_ALLOW_SIGN_UP=false
|
||||
@@ -87,8 +97,8 @@ services:
|
||||
- /etc/resolv.conf:/etc/resolv.conf:ro
|
||||
ports:
|
||||
- "3005:8080"
|
||||
network_mode: "host"
|
||||
env_file: .env
|
||||
networks:
|
||||
- iot
|
||||
environment:
|
||||
- BOT_TOKEN=${PGSAIL_TELEGRAM_BOT_TOKEN}
|
||||
- PGSAIL_URL=${PGSAIL_API_URL}
|
||||
@@ -107,16 +117,60 @@ services:
|
||||
container_name: web_dev
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/resolv.conf:/etc/resolv.conf:ro
|
||||
- $PWD/frontend:/app
|
||||
networks:
|
||||
iot:
|
||||
ipv4_address: 172.30.0.4
|
||||
ports:
|
||||
- "3006:8080"
|
||||
network_mode: "host"
|
||||
env_file: .env
|
||||
- 8080:8080
|
||||
environment:
|
||||
- VITE_PGSAIL_URL=${PGSAIL_API_URL}
|
||||
- VUE_APP_INCLUDE_DEMOS=false
|
||||
- VITE_APP_INCLUDE_DEMOS=false
|
||||
- VITE_APP_BUILD_VERSION=true
|
||||
- VITE_APP_TITLE=PostgSail Dev
|
||||
- VITE_APP_TITLE=${VITE_APP_TITLE}
|
||||
depends_on:
|
||||
- db
|
||||
- api
|
||||
logging:
|
||||
options:
|
||||
max-size: 10m
|
||||
|
||||
pgadmin:
|
||||
image: dpage/pgadmin4:latest
|
||||
container_name: pgadmin
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- data:/var/lib/pgadmin
|
||||
- $PWD/.codesandbox/servers.json:/servers.json:ro
|
||||
ports:
|
||||
- 5050:5050
|
||||
environment:
|
||||
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
|
||||
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
|
||||
- PGADMIN_LISTEN_ADDRESS=0.0.0.0
|
||||
- PGADMIN_LISTEN_PORT=5050
|
||||
- PGADMIN_SERVER_JSON_FILE=/servers.json
|
||||
- PGADMIN_DISABLE_POSTFIX=true
|
||||
networks:
|
||||
- iot
|
||||
#depends_on:
|
||||
# - db
|
||||
logging:
|
||||
options:
|
||||
max-size: 10m
|
||||
|
||||
swagger:
|
||||
image: swaggerapi/swagger-ui
|
||||
container_name: swagger
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8181:8080"
|
||||
expose:
|
||||
- "8080"
|
||||
environment:
|
||||
API_URL: http://172.30.0.3:3000/
|
||||
networks:
|
||||
- iot
|
||||
depends_on:
|
||||
- db
|
||||
- api
|
||||
@@ -126,3 +180,12 @@ services:
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
|
||||
networks:
|
||||
iot:
|
||||
driver: bridge
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.30.0.0/24
|
||||
gateway: 172.30.0.1
|
||||
|
1
frontend
Submodule
1
frontend
Submodule
Submodule frontend added at 859424fef0
Reference in New Issue
Block a user