-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
113 lines (104 loc) · 2.72 KB
/
docker-compose.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
services:
dynamodb:
image: amazon/dynamodb-local:latest
restart: always
ports:
- "127.0.0.1:8000:8000"
dynamodb-init:
image: hashicorp/terraform:1.9
depends_on:
- dynamodb
restart: on-failure
volumes:
- type: bind
source: ./db-schemas/dynamodb
target: /infra
working_dir: /infra
entrypoint: "/bin/sh"
command: ["-c", "terraform init && terraform apply -auto-approve"]
environment:
TF_VAR_endpoint: http://dynamodb:8000
TF_VAR_region: us-west-2
TF_VAR_access_key_id: xxx
TF_VAR_secret_access_key: xxx
mysql:
image: mysql:8.4
restart: always
ports:
- "127.0.0.1:3306:3306"
environment:
MYSQL_ROOT_PASSWORD: xxx
command: ["--general-log=1", "--general-log-file=/tmp/query.log"]
mysql-init:
image: flyway/flyway:11-alpine
depends_on:
- mysql
restart: on-failure
volumes:
- type: bind
source: ./db-schemas/mysql
target: /flyway/sql
command:
- "-url=jdbc:mysql://mysql:3306/demo?createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true"
- "-user=root"
- "-password=xxx"
- "-connectRetries=60"
- "migrate"
postgres:
image: postgres:17-alpine
restart: always
ports:
- "127.0.0.1:5432:5432"
environment:
POSTGRES_PASSWORD: xxx
POSTGRES_DB: demo
command: ["-c", "log_statement=all"]
postgres-init:
image: flyway/flyway:11-alpine
depends_on:
- postgres
restart: on-failure
volumes:
- type: bind
source: ./db-schemas/postgres
target: /flyway/sql
command:
- "-url=jdbc:postgresql://postgres:5432/demo"
- "-user=postgres"
- "-password=xxx"
- "-connectRetries=60"
- "migrate"
ftp:
image: delfer/alpine-ftp-server
restart: always
ports:
- "127.0.0.1:2121:21"
- "127.0.0.1:21000-21010:21000-21010"
environment:
ADDRESS: "localhost"
USERS: "foo|BC499D13-EB4B-4EAE-994D-7435364654C5"
sftp:
image: atmoz/sftp:alpine
restart: always
ports:
- "127.0.0.1:2222:22"
entrypoint: "/bin/bash"
# Disable chroot to avoid 100% CPU in Fedora:
# - https://unix.stackexchange.com/q/729987/144328
# - https://scvalex.net/posts/56/
command:
- "-c"
- "sed -i '/ChrootDirectory/d' /etc/ssh/sshd_config && /entrypoint foo:bar:1000:1000:upload"
minio:
image: minio/minio
restart: always
ports:
- "127.0.0.1:9000:9000"
- "127.0.0.1:9001:9001"
entrypoint: sh
command: -c 'mkdir -p /data/demo && /usr/bin/minio server /data --console-address :9001'
redis:
image: redis:7-alpine
restart: always
ports:
- "127.0.0.1:6379:6379"