-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from alexjoybc/feature/sftp-demo-app
Added config for sftp
- Loading branch information
Showing
9 changed files
with
104 additions
and
12 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
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,22 @@ | ||
# Sample application | ||
|
||
## SFTP Config | ||
|
||
run | ||
|
||
```bash | ||
docker-compose up | ||
``` | ||
|
||
run | ||
|
||
```bash | ||
ssh-keyscan -H localhost -p 22 >> ~/.ssh/known_hosts | ||
``` | ||
|
||
configure the following environment variables on your environment: | ||
|
||
| Name | Value | | ||
| --- | --- | | ||
| KNOWN_HOSTS | ~/.ssh/known_hosts | | ||
| spring_active_profiles | sftp | |
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,36 @@ | ||
version: '3.7' | ||
services: | ||
|
||
############################################################################################# | ||
### SFTP SERVER ### | ||
############################################################################################# | ||
dps-sftp: | ||
image: atmoz/sftp | ||
ports: | ||
- "22:22" | ||
command: admin:admin:::upload | ||
networks: | ||
- doc-access | ||
|
||
|
||
############################################################################################# | ||
### REDIS SERVER ### | ||
############################################################################################# | ||
dps-redis: | ||
container_name: redis | ||
image: redis | ||
command: redis-server --requirepass admin | ||
ports: | ||
- "6379:6379" | ||
volumes: | ||
- data-redis:/data | ||
restart: always | ||
networks: | ||
- doc-access | ||
|
||
volumes: | ||
data-redis: | ||
|
||
networks: | ||
doc-access: | ||
driver: "bridge" |
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
34 changes: 34 additions & 0 deletions
34
jrcc-access-spring-boot-sample-app/src/main/resources/application-sftp.yml
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,34 @@ | ||
main: | ||
web-application-type: none | ||
logging: | ||
level: | ||
ca: | ||
gov: | ||
bc: DEBUG | ||
pattern: | ||
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} %X{transaction.filename} %X{transaction.id} - %msg%n" | ||
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} %X{transaction.filename} - %msg%n" | ||
spring: | ||
redis: | ||
host: localhost | ||
port: 6379 | ||
password: admin | ||
bcgov: | ||
access: | ||
input: | ||
sender: bcgov | ||
document-type: test-doc | ||
plugin: sftp | ||
sftp: | ||
port: 22 | ||
username: admin | ||
password: admin | ||
remoteDirectory: upload | ||
filterPattern: .*.xml | ||
cron: '*/5 * * * * ?' | ||
maxMessagePerPoll: 1 | ||
allowUnknownKeys: true | ||
knownHostFile: ${KNOWN_HOSTS} | ||
output: | ||
document-type: test-doc | ||
plugin: console |
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
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