-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
116 lines (109 loc) · 2.26 KB
/
docker-compose.yml
File metadata and controls
116 lines (109 loc) · 2.26 KB
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
version: '3.8'
services:
# Development environment
dev:
build:
context: .
dockerfile: Dockerfile
target: dev
volumes:
- .:/app
- build-cache:/app/build
ports:
- "21:21/tcp"
- "990:990/tcp"
- "1024-65535:1024-65535/tcp"
environment:
- PLATFORM=linux
- DISTRO=ubuntu
command: /bin/bash
profiles:
- dev
# Runtime container
simple-sftpd:
build:
context: .
dockerfile: Dockerfile
target: runtime
ports:
- "21:21/tcp"
- "990:990/tcp"
- "1024-65535:1024-65535/tcp"
volumes:
- ./config:/etc/simple-sftpd:ro
- ./logs:/var/log/simple-sftpd
- ./data:/var/ftp
environment:
- FTP_ROOT_DIR=/var/ftp
- FTP_CONFIG_FILE=/etc/simple-sftpd/simple-sftpd.conf
- LOG_LEVEL=info
restart: unless-stopped
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "21"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
profiles:
- runtime
# Build environments for different distributions
build-ubuntu:
build:
context: .
dockerfile: Dockerfile
target: ubuntu-builder
volumes:
- ./dist:/app/dist
- build-cache:/app/build
environment:
- PLATFORM=linux
- DISTRO=ubuntu
profiles:
- build
build-centos:
build:
context: .
dockerfile: Dockerfile
target: centos-builder
volumes:
- ./dist:/app/dist
- build-cache:/app/build
environment:
- PLATFORM=linux
- DISTRO=centos
profiles:
- build
build-alpine:
build:
context: .
dockerfile: Dockerfile
target: alpine-builder
volumes:
- ./dist:/app/dist
- build-cache:/app/build
environment:
- PLATFORM=linux
- DISTRO=alpine
profiles:
- build
# Multi-architecture build
build-multiarch:
build:
context: .
dockerfile: Dockerfile
target: multiarch-builder
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7
volumes:
- ./dist:/app/dist
- build-cache:/app/build
environment:
- PLATFORM=linux
- DISTRO=multiarch
profiles:
- build
volumes:
build-cache:
driver: local