-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yml
96 lines (90 loc) · 2.61 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
# Please read.
# https://github.com/WardPearce/paaster#production-with-docker
# Need help? Open a Issue.
# https://github.com/WardPearce/paaster/issues/new
version: '3'
services:
paaster-backend:
container_name: paaster-backend
image: wardpearce/paaster-backend:latest
restart: unless-stopped
ports:
- "8888:80"
environment:
paaster_max_paste_size: 1049000
paaster_max_iv_size: 42
paaster_open_api: |
{
"title": "paaster.io",
"version": "2.0.0"
}
paaster_mongo: |
{
"host": "paaster-mongodb",
"port": 27017,
"collection": "paasterv2"
}
paaster_s3: |
{
"endpoint_url": "${MINIO_ENDPOINT}",
"secret_access_key": "${MINIO_SECRET_KEY}",
"access_key_id": "${MINIO_ACCESS_KEY}",
"region_name": "us-east-1",
"bucket": "${MINIO_BUCKET_NAME}",
"folder": "pastes",
"download_url": "${MINIO_ENDPOINT}/${MINIO_BUCKET_NAME}"
}
paaster_proxy_urls: |
{
"frontend": "${PAASTER_FRONTEND_URL}",
"backend": "${PAASTER_BACKEND_URL}"
}
depends_on:
- paaster-mongodb
- paaster-minio
paaster:
container_name: paaster
image: wardpearce/paaster-frontend:latest
restart: unless-stopped
environment:
VITE_NAME: "${PAASTER_FRONTEND_URL}"
VITE_API_URL: "${PAASTER_BACKEND_URL}"
ports:
- "8889:80"
paaster-mongodb:
image: mongo:latest
container_name: paaster-mongodb
restart: unless-stopped
environment:
MONGODB_DATA_DIR: /data/db
MONDODB_LOG_DIR: /dev/null
volumes:
- ./mongo_data:/data/db
paaster-minio:
image: minio/minio
container_name: paaster-minio
restart: unless-stopped
volumes:
- ./minio_data:/data
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
command: minio server /data
ports:
- "9000:9000"
paaster-minio-init:
image: minio/mc
container_name: paaster-minio-init
restart: "no"
depends_on:
- paaster-minio
entrypoint: >
/bin/sh -c "
until /usr/bin/mc alias set myminio ${MINIO_ENDPOINT} ${MINIO_ACCESS_KEY} ${MINIO_SECRET_KEY}; do echo waiting for minio; sleep 1; done;
if /usr/bin/mc ls myminio/${MINIO_BUCKET_NAME}; then
echo 'Bucket already exists'
else
until /usr/bin/mc mb myminio/${MINIO_BUCKET_NAME}; do echo waiting for minio to be ready; sleep 1; done;
fi;
/usr/bin/mc anonymous set download myminio/${MINIO_BUCKET_NAME};
exit 0"