-
Notifications
You must be signed in to change notification settings - Fork 19
/
compose.yml
72 lines (66 loc) · 1.66 KB
/
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
# Docker compose file to run paste.sh locally.
#
# Optional, build (the image is published):
# docker-compose build
#
# (One off to make the serverauth secret:)
# docker-compose up serverauth
#
# docker-compose --profile update-misc up
#
# Then visit https://localhost:5000
services:
serverauth:
image: davidgl/pastesh
entrypoint: ["/bin/bash", "-c", "./generate-serverauth /work/serverauth"]
volumes:
- .:/work
pastesh:
depends_on:
serverauth:
condition: service_completed_successfully
build:
context: .
dockerfile: Dockerfile
image: davidgl/pastesh
restart: unless-stopped
# if you use a reverse proxy container, you can remove the port mapping.
ports:
- "5000:5000"
volumes:
- paste-db:/db
secrets:
- serverauth
healthcheck:
test: curl localhost:5000
start_period: 10s
interval: 10s
timeout: 2s
retries: 3
# if use a reverse proxy container, you can uncomment the networks sections here, and below.
#networks:
# - apps
update-misc:
image: davidgl/pastesh
# Use docker-compose --profile update-misc up to run this, note this will
# use whatever is in davidgl/pastesh, so be careful to ensure you've built
# it locally (i.e. docker-compose build), else you'll get the paste.sh
# upstream misc data.
profiles:
- update-misc
restart: no
entrypoint: ["./update-misc"]
depends_on:
pastesh:
condition: service_healthy
network_mode: service:pastesh
secrets:
- serverauth
#networks:
# apps:
# external: true
volumes:
paste-db:
secrets:
serverauth:
file: ./serverauth