mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
add devcontainer config
This commit is contained in:
parent
ea91251002
commit
bcd451e23e
1
.devcontainer/Dockerfile
Normal file
1
.devcontainer/Dockerfile
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
FROM mcr.microsoft.com/vscode/devcontainers/base:debian
|
||||||
42
.devcontainer/devcontainer.json
Normal file
42
.devcontainer/devcontainer.json
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||||
|
// README at: https://github.com/devcontainers/templates/tree/main/src/java-postgres
|
||||||
|
{
|
||||||
|
"name": "Java & PostgreSQL",
|
||||||
|
"dockerComposeFile": "docker-compose.yml",
|
||||||
|
"service": "app",
|
||||||
|
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
||||||
|
"features": {
|
||||||
|
"ghcr.io/devcontainers-contrib/features/sbt-sdkman:2": {
|
||||||
|
"jdkVersion": "11"
|
||||||
|
},
|
||||||
|
"ghcr.io/devcontainers-contrib/features/scala-sdkman:2": {
|
||||||
|
"jdkVersion": "11"
|
||||||
|
},
|
||||||
|
"ghcr.io/devcontainers-contrib/features/scalacli-sdkman:2": {
|
||||||
|
"jdkVersion": "11"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
|
// "features": {}
|
||||||
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
// This can be used to network with other containers or with the host.
|
||||||
|
// "forwardPorts": [
|
||||||
|
// 51000,
|
||||||
|
// 51001,
|
||||||
|
// 51002
|
||||||
|
// ],
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
"scalameta.metals",
|
||||||
|
"scala-lang.scala"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
|
// "postCreateCommand": "java -version",
|
||||||
|
// Configure tool-specific properties.
|
||||||
|
// "customizations": {},
|
||||||
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||||
|
// "remoteUser": "root"
|
||||||
|
}
|
||||||
31
.devcontainer/docker-compose.yml
Normal file
31
.devcontainer/docker-compose.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres-data:
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
container_name: javadev
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
environment:
|
||||||
|
CONFIG_FORCE_database_host: postgres
|
||||||
|
CONFIG_FORCE_bind: 0.0.0.0
|
||||||
|
volumes:
|
||||||
|
- ../..:/workspaces:cached
|
||||||
|
command: sleep infinity
|
||||||
|
# network_mode: service:postgres
|
||||||
|
ports:
|
||||||
|
- "51000:51000/udp"
|
||||||
|
- "51001:51001/udp"
|
||||||
|
# - "51000:51002"
|
||||||
|
postgres:
|
||||||
|
image: postgres:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- postgres-data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
POSTGRES_PASSWORD: psforever
|
||||||
|
POSTGRES_USER: psforever
|
||||||
|
POSTGRES_DB: psforever
|
||||||
Loading…
Reference in a new issue