init
This commit is contained in:
32
.devcontainer/internal/devcontainer.json
Normal file
32
.devcontainer/internal/devcontainer.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "K12Study Internal DB Dev",
|
||||
"dockerComposeFile": [
|
||||
"docker-compose.yml"
|
||||
],
|
||||
"service": "workspace",
|
||||
"workspaceFolder": "/workspaces/K12study",
|
||||
"runServices": ["workspace", "postgres", "redis"],
|
||||
"shutdownAction": "stopCompose",
|
||||
"forwardPorts": [5173, 8080, 8081, 8082, 8088, 9000, 5432, 6379],
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"terminal.integrated.defaultProfile.linux": "bash"
|
||||
},
|
||||
"extensions": [
|
||||
"vscjava.vscode-java-pack",
|
||||
"redhat.java",
|
||||
"vmware.vscode-boot-dev-pack",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"ms-python.python",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode"
|
||||
]
|
||||
}
|
||||
},
|
||||
"remoteEnv": {
|
||||
"SPRING_PROFILES_ACTIVE": "dev",
|
||||
"K12STUDY_DEV_MODE": "internal"
|
||||
},
|
||||
"postCreateCommand": "cd /workspaces/K12study/frontend && pnpm install"
|
||||
}
|
||||
46
.devcontainer/internal/docker-compose.yml
Normal file
46
.devcontainer/internal/docker-compose.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
services:
|
||||
workspace:
|
||||
image: mcr.microsoft.com/devcontainers/universal:2
|
||||
volumes:
|
||||
- ../../:/workspaces/K12study:cached
|
||||
working_dir: /workspaces/K12study
|
||||
command: sleep infinity
|
||||
environment:
|
||||
K12STUDY_DB_HOST: postgres
|
||||
K12STUDY_DB_PORT: 5432
|
||||
K12STUDY_DB_NAME: k12study
|
||||
K12STUDY_DB_USER: k12study
|
||||
K12STUDY_DB_PASSWORD: k12study
|
||||
K12STUDY_REDIS_HOST: redis
|
||||
K12STUDY_REDIS_PORT: 6379
|
||||
K12STUDY_REDIS_PASSWORD: ""
|
||||
PYTHONUNBUFFERED: "1"
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
|
||||
postgres:
|
||||
image: postgres:16
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: k12study
|
||||
POSTGRES_USER: k12study
|
||||
POSTGRES_PASSWORD: k12study
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres-dev-data:/var/lib/postgresql/data
|
||||
- ../../init/pg:/docker-entrypoint-initdb.d
|
||||
|
||||
redis:
|
||||
image: redis:7
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6379:6379"
|
||||
command: redis-server --appendonly yes
|
||||
volumes:
|
||||
- redis-dev-data:/data
|
||||
|
||||
volumes:
|
||||
postgres-dev-data:
|
||||
redis-dev-data:
|
||||
Reference in New Issue
Block a user