-
Notifications
You must be signed in to change notification settings - Fork 3
/
infrastructure.yml
136 lines (129 loc) · 3.83 KB
/
infrastructure.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
version: '3.7'
services:
#######################################################
# Localstack services for development
#
# - DynamoDB (http port 4569)
# - S3 (http port 4572)...
# - SQS (http port 4576)
# - CloudFormation (http port 4581)
#######################################################
localstack:
image: localstack/localstack:1.2.0
ports:
- '4563-4599:4563-4599'
- '${PORT_WEB_UI-4080}:${PORT_WEB_UI-8080}'
environment:
- SERVICES=s3,dynamodb,secretsmanager,cloudformation
- DEFAULT_REGION=eu-west-2
- DOCKER_HOST=unix:///var/run/docker.sock
- LAMBDA_EXECUTOR=docker
- LAMBDA_REMOTE_DOCKER=false
- DYNAMODB_HEAP_SIZE=1G
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./volumes/localstack:/var/lib/localstack
- ./resources/infrastructure/localstack/localstack-init.sh:/docker-entrypoint-initaws.d/init.sh
- ./resources/infrastructure/localstack/localstack-cfn.yml:/docker-entrypoint-initaws.d/localstack-cfn.yml
deploy:
restart_policy:
condition: on-failure
dynamodb_admin:
image: aaronshaf/dynamodb-admin
ports:
- '8002:8001'
environment:
- DYNAMO_ENDPOINT=http://host.docker.internal:4566
deploy:
restart_policy:
condition: on-failure
#######################################################
# Redis
#######################################################
redis:
image: redis:alpine
ports:
- '6379:6379'
volumes:
- ./volumes/redis:/data
deploy:
restart_policy:
condition: on-failure
redis_insight:
image: redislabs/redisinsight
ports:
- '8001:8001'
volumes:
- ./volumes/redisinsight:/db
deploy:
restart_policy:
condition: on-failure
redis_commander:
image: rediscommander/redis-commander
ports:
- '8003:8081'
environment:
- REDIS_HOSTS=local:redis:6379
deploy:
restart_policy:
condition: on-failure
#######################################################
# Elasticmq (SQS provider)
#######################################################
elasticmq:
image: softwaremill/elasticmq-native
ports:
- '9324:9324'
volumes:
- type: bind
read_only: true
source: resources/infrastructure/elasticmq/elasticmq.conf
target: /opt/elasticmq.conf
deploy:
restart_policy:
condition: on-failure
#######################################################
# nginx
#######################################################
nginx:
image: nginx:alpine
environment:
- WEBSALES_LISTEN=3043
- TELESALES_LISTEN=3143
- WEBSALES_UPSTREAM_PORT=3000
- TELESALES_UPSTREAM_PORT=3100
volumes:
- ./resources/infrastructure/nginx/templates:/etc/nginx/templates
- ./resources/infrastructure/nginx/ssl:/etc/nginx/ssl
ports:
- '3043:3043'
- '3143:3143'
deploy:
restart_policy:
condition: on-failure
#######################################################
# Test SFTP server
#######################################################
ftp:
image: rod_licensing/ftp:${TAG:-latest}
build:
dockerfile: Dockerfile
context: ./resources/infrastructure/sftp
depends_on:
- localstack
ports:
- '2222:22'
volumes:
- ./volumes/sftp:/home/test_sftp_user/share
environment:
SFTP_USER: test_sftp_user
SFTP_FOLDERS: share/pocl;share/fulfilment
AWS_SECRETSMANAGER_ENDPOINT: http://host.docker.internal:4566
AWS_DEFAULT_REGION: eu-west-2
AWS_ACCESS_KEY_ID: local
AWS_SECRET_ACCESS_KEY: local
SSH_HOST_ED25519_SECRET_ID: /dev/fsh/local/sftp/ssh_ed25519_host_key
SSH_HOST_RSA_SECRET_ID: /dev/fsh/local/sftp/ssh_rsa_host_key
deploy:
restart_policy:
condition: on-failure