-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.production.yaml
47 lines (42 loc) · 1.15 KB
/
docker-compose.production.yaml
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
version: '3.7'
networks:
caddy:
database:
services:
client:
# TODO: change the tag to latest
image: ghcr.io/mrnossiom/pgpaste-server:dev
volumes:
- .env.docker:/pgpaste-server/.env
depends_on:
database:
condition: service_healthy
networks: [ database, caddy ]
# MySQL database
database:
image: postgres
restart: unless-stopped
environment:
POSTGRES_DATABASE: server
POSTGRES_USER: server
POSTGRES_PASSWORD: server
volumes:
- ./.database:/var/lib/postgresql/data
healthcheck:
test: pg_isready -h 127.0.0.1 -U $$POSTGRES_USER
timeout: 2s
retries: 20
networks: [ database ]
# Reverse proxy for the server
caddy:
image: caddy:latest
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./.caddy/site:/srv
- ./.caddy/caddy_data:/data
- ./.caddy/caddy_config:/config
networks: [ caddy ]