-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathcompose.yml
71 lines (65 loc) · 1.62 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
# 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 http://localhost:5000
services:
serverauth:
image: ubuntu:latest
entrypoint: ["/bin/bash", "-c", "cd /work; ./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: ["CMD", "/usr/local/bin/perl", "-e", "exit !-s /run/secrets/serverauth"]
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: ubuntu:latest
# Use docker-compose --profile update-misc up to run this.
profiles:
- update-misc
restart: "no"
entrypoint: ["/bin/bash", "-c", "ln -s /work/misc; ln -s /run/secrets/serverauth; /work/update-misc"]
depends_on:
pastesh:
condition: service_healthy
network_mode: service:pastesh
secrets:
- serverauth
volumes:
- .:/work
#networks:
# apps:
# external: true
volumes:
paste-db:
secrets:
serverauth:
file: ./serverauth