Skip to content

Commit

Permalink
Devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
Portals committed Aug 26, 2024
1 parent c830bbb commit a34bd99
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 62 deletions.
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "Gamma Devcontainer",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",

"features": {
"ghcr.io/devcontainers/features/java:1": {
"installGradle": true,
"gradleVersion": "8.10",
"jdkDistro": "open"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "20"
}
},

"forwardPorts": [8081],

"customizations" : {
"jetbrains" : {
"backend" : "IntelliJ"
}
}

}
33 changes: 33 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
volumes:
postgres-data:

services:
app:
container_name: javadev
image: mcr.microsoft.com/devcontainers/java:1-21
volumes:
- ../..:/workspaces:cached
command: sleep infinity

db:
image: postgres:16
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"

redis:
image: redis:5.0
restart: always
ports:
- "6379:6379"

gotify:
image: cthit/gotify:latest
environment:
GOTIFY_PRE-SHARED-KEY: "123abc"
GOTIFY_MOCK-MODE: "true"
GOTIFY_DEBUG-MODE: "true"
ports:
- "80:80"
4 changes: 0 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ dependencies {
"org.webjars.npm:hyperscript.org:0.9.12",
"org.webjars.npm:picocss__pico:2.0.6"
)

developmentOnly(
"org.springframework.boot:spring-boot-docker-compose:3.3.0"
)
}

repositories {
Expand Down
24 changes: 0 additions & 24 deletions app/compose.yml

This file was deleted.

17 changes: 4 additions & 13 deletions app/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
---
spring:
docker:
compose:
lifecycle-management: "start-and-stop"
start:
command: "UP"
stop:
command: "down"
readiness:
timeout: 10m
datasource:
username: "${DB_USER:postgres}"
password: "${DB_PASSWORD:example}"
url: "jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:postgres}"
password: "${DB_PASSWORD:postgres}"
url: "jdbc:postgresql://${DB_HOST:db}:${DB_PORT:5432}/${DB_NAME:postgres}"
flyway:
baseline-on-migrate: true
locations: "classpath:/db/migration"
Expand All @@ -34,7 +25,7 @@ spring:
max-file-size: 50MB
data:
redis:
host: "${REDIS_HOST:0.0.0.0}"
host: "${REDIS_HOST:redis}"
password: "${REDIS_PASSWORD:}"
port: "${REDIS_PORT:6379}"
repositories:
Expand Down Expand Up @@ -75,4 +66,4 @@ application:
admin-setup: "${ADMIN_SETUP:true}"
gotify:
key: "${GOTIFY_KEY:123abc}"
url: "${GOTIFY_BASE_URL:http://localhost:8080}"
url: "${GOTIFY_BASE_URL:http://db:8080}"
21 changes: 0 additions & 21 deletions no_backend.docker-compose.yml

This file was deleted.

0 comments on commit a34bd99

Please sign in to comment.