-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docker based development with src watcher
- Loading branch information
1 parent
bb21e75
commit 489c250
Showing
9 changed files
with
74 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: "2" | ||
|
||
services: | ||
app: | ||
container_name: converter-dev | ||
image: eugenmayer/kontextwork-converter:development | ||
working_dir: /src | ||
entrypoint: ./gradlew | ||
command: -Pdev bootRun | ||
volumes: | ||
- ./:/src | ||
ports: | ||
- 5001:5001 | ||
- 8080:8080 | ||
mem_limit: 512M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
import springfox.documentation.spi.DocumentationType; | ||
import springfox.documentation.spring.web.plugins.Docket; | ||
import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
|
||
import java.util.Collections; | ||
|
||
@SpringBootApplication | ||
|
@@ -21,5 +20,31 @@ public class ConverterApplication { | |
public static void main(String[] args) { | ||
SpringApplication.run(ConverterApplication.class, args); | ||
} | ||
@Configuration | ||
@EnableSwagger2 | ||
@Profile("dev") | ||
public class SwaggerConfig { | ||
@Bean | ||
public Docket api() { | ||
return new Docket(DocumentationType.SWAGGER_2) | ||
.useDefaultResponseMessages(false) | ||
.select() | ||
.apis(RequestHandlerSelectors.basePackage("de.kontextwork.converter")) | ||
.paths(PathSelectors.regex("/conversion.*")) | ||
.build() | ||
.apiInfo(apiInfo()); | ||
} | ||
|
||
private ApiInfo apiInfo() { | ||
return new ApiInfo( | ||
"Conversion REST API", | ||
"Conversion REST API for Online conversion. Automates conversions between office document formats using JODconverter, LibreOffice or Apache OpenOffice.", | ||
"0.1", | ||
"Terms of service", | ||
new Contact("No", "kontextwork.de", "[email protected]"), | ||
"Unknown", | ||
"Unknown", | ||
Collections.emptyList()); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
src/main/java/de/kontextwork/converter/config/SwaggerConfig.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
docker-compose up "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env bash | ||
docker exec --workdir /src converter-dev ./gradlew build --continuous |