Compare commits
No commits in common. "057d0120b7ab22802d57754c5aa982da9f0a1ad4" and "fb4ff607299f337d6c911a8f94f8844f26c725f6" have entirely different histories.
057d0120b7
...
fb4ff60729
@ -27,9 +27,6 @@ dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
||||
runtimeOnly 'org.postgresql:postgresql'
|
||||
implementation 'org.hibernate.validator:hibernate-validator'
|
||||
}
|
||||
|
||||
tasks.named('test') {
|
||||
|
||||
@ -12,20 +12,6 @@ services:
|
||||
- OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID}
|
||||
- OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET}
|
||||
- HOST_PORT=${HOST_PORT}
|
||||
- POSTGRES_USER=${POSTGRES_USERNAME}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
env_file:
|
||||
- stack.env
|
||||
restart: unless-stopped
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
container_name: cftunnel-db
|
||||
environment:
|
||||
POSTGRES_DB: cftunnel
|
||||
POSTGRES_USER: ${POSTGRES_USERNAME}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${DB_PORT}:5432"
|
||||
volumes:
|
||||
- ${DB_PATH}:/var/lib/postgresql/data
|
||||
@ -1,10 +1 @@
|
||||
api.corsResolveUrl=http://localhost:8080
|
||||
|
||||
management.health.db.enabled=true
|
||||
management.endpoints.web.exposure.include=health
|
||||
management.endpoint.health.show-details=always
|
||||
|
||||
logging.level.org.hibernate.SQL=DEBUG
|
||||
debug=true
|
||||
|
||||
spring.datasource.url=jdbc:postgresql://localhost:5432/cftunnel
|
||||
|
||||
@ -17,15 +17,3 @@ spring.security.oauth2.client.provider.cftunnels.token-uri=https://auth.hithomel
|
||||
spring.security.oauth2.client.provider.cftunnels.user-info-uri=https://auth.hithomelabs.com/application/o/userinfo/
|
||||
spring.security.oauth2.client.provider.cftunnels.jwk-set-uri=https://auth.hithomelabs.com/application/o/cftunnels/jwks/
|
||||
spring.security.oauth2.client.provider.cftunnels.issuer-uri=https://auth.hithomelabs.com/application/o/cftunnels/
|
||||
|
||||
spring.datasource.url=jdbc:postgresql://192.168.0.100:5432/cftunnel
|
||||
spring.datasource.username=${POSTGRES_USERNAME}
|
||||
spring.datasource.password=${POSTGRES_PASSWORD}
|
||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||
spring.sql.init.mode=never
|
||||
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
spring.jpa.show-sql=true
|
||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
||||
|
||||
spring.jpa.open-in-view=false
|
||||
@ -1,37 +0,0 @@
|
||||
-- schema.sql
|
||||
|
||||
-- Roles table
|
||||
CREATE TABLE IF NOT EXISTS roles (
|
||||
role_id SERIAL PRIMARY KEY,
|
||||
role_name VARCHAR(50) UNIQUE NOT NULL
|
||||
);
|
||||
|
||||
-- Users table
|
||||
CREATE TABLE IF NOT EXISTS users (
|
||||
user_id SERIAL PRIMARY KEY,
|
||||
user_name VARCHAR(100) NOT NULL,
|
||||
password VARCHAR(255) NOT NULL
|
||||
);
|
||||
|
||||
-- User-Role Mapping table (many-to-many relationship)
|
||||
CREATE TABLE IF NOT EXISTS user_role_mapping (
|
||||
mapping_id SERIAL PRIMARY KEY,
|
||||
user_id INTEGER NOT NULL REFERENCES users(user_id) ON DELETE CASCADE,
|
||||
role_id INTEGER NOT NULL REFERENCES roles(role_id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- Tunnels table
|
||||
CREATE TABLE IF NOT EXISTS tunnels (
|
||||
tunnel_id SERIAL PRIMARY KEY,
|
||||
tunnel_name VARCHAR(100) NOT NULL,
|
||||
tunnel_type VARCHAR(50) NOT NULL
|
||||
);
|
||||
|
||||
-- Mapping Requests table
|
||||
CREATE TABLE IF NOT EXISTS mapping_requests (
|
||||
request_id SERIAL PRIMARY KEY,
|
||||
request_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
status VARCHAR(20) NOT NULL,
|
||||
user_id INTEGER REFERENCES users(user_id) ON DELETE SET NULL,
|
||||
tunnel_id INTEGER REFERENCES tunnels(tunnel_id) ON DELETE SET NULL
|
||||
);
|
||||
Loading…
Reference in New Issue
Block a user