Skip to content

Commit

Permalink
Adding sftp config for test app
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Apr 15, 2020
1 parent 8da40fd commit 17ca815
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
22 changes: 22 additions & 0 deletions jrcc-access-spring-boot-sample-app/README.md
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 |
36 changes: 36 additions & 0 deletions jrcc-access-spring-boot-sample-app/docker-compose.yml
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"
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

0 comments on commit 17ca815

Please sign in to comment.