Setup proper dev environment

This commit is contained in:
2026-01-02 20:45:10 +05:00
parent c143fe66ac
commit b6d88b1666
5 changed files with 91 additions and 3 deletions

36
.dockerignore Normal file
View File

@ -0,0 +1,36 @@
HELP.md
.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
.env

View File

@ -1,8 +1,35 @@
FROM maven:3-eclipse-temurin-21
FROM eclipse-temurin:21-jdk-jammy
RUN apt-get update && \
apt-get install -y ffmpeg && \
apt-get install -y --no-install-recommends \
curl \
vim \
git \
ca-certificates \
ffmpeg && \
rm -rf /var/lib/apt/lists/*
# Create non-root user
RUN groupadd --gid 1000 spring-app && \
useradd --uid 1000 --gid spring-app --shell /bin/bash --create-home spring-app
RUN mkdir -p /home/spring-app/.m2 && \
chown -R spring-app:spring-app /home/spring-app/.m2
WORKDIR /app
COPY mvnw .
COPY .mvn .mvn
COPY pom.xml .
COPY target target
RUN chmod +x mvnw && \
chown -R spring-app:spring-app /app
USER spring-app:spring-app
COPY src ./src
EXPOSE 8080
ENTRYPOINT ["./mvnw", "spring-boot:run"]

View File

@ -1,4 +1,17 @@
services:
hls-proxy:
build:
context: .
dockerfile: Dockerfile.dev
env_file: .env
ports:
- 8080:8080
networks:
- mp3_composer
volumes:
- .:/app
- maven-repo:/home/spring-app/.m2/
s3:
image: minio/minio:latest
container_name: composer_s3
@ -6,7 +19,7 @@ services:
networks:
- mp3_composer
ports:
- 9001:9001
- 0:9001
postgres:
image: postgres:alpine
container_name: composer_postgres
@ -39,6 +52,9 @@ services:
networks:
- mp3_composer
volumes:
maven-repo:
networks:
mp3_composer:
external: true

View File

@ -122,6 +122,12 @@
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>

View File

@ -0,0 +1,3 @@
spring:
flyway:
enabled: false