-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
101 lines (93 loc) · 2.33 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
97
98
99
100
101
# Docker Compose file for Vapor
#
# Install Docker on your system to run and test
# your Vapor app in a production-like environment.
#
# Note: This file is intended for testing and does not
# implement best practices for a production deployment.
#
# Learn more: https://docs.docker.com/compose/reference/
#
# Build images: docker-compose build
# Start app: docker-compose up app
# Start database: docker-compose up db
# Run migrations: docker-compose up migrate
# Stop all: docker-compose down (add -v to wipe db)
#
version: "3.7"
x-config:
&server_config
build: ./
depends_on:
- db
- redis
volumes:
- ./private/:/app/private
x-shared_environment:
&server_environment
LOG_LEVEL: ${LOG_LEVEL:-info}
DATABASE_URL: "postgres://vapor_username:vapor_password@db/vapor_database"
REDIS_URL: "redis://redis:6379"
# APNS_KEY_PATH: ""
# APNS_KEY_ID: ""
# APNS_TEAM_ID: ""
# APNS_ENVIRONMENT: "staging"
# SENDGRID_API_KEY: ""
# PUFFERY_STATISTICS_CHANNELS: ""
services:
puffery:
<<: *server_config
restart: always
expose:
- 80
environment:
<<: *server_environment
command:
[
"serve",
"--env",
"production",
"--hostname",
"0.0.0.0",
"--port",
"80",
"--auto-migrate"
]
puffery-queues:
<<: *server_config
restart: always
environment:
<<: *server_environment
command: [ "queues" ]
puffery-queues-scheduled:
<<: *server_config
restart: always
environment:
<<: *server_environment
command: [ "queues", "--scheduled" ]
inbound-middleware:
image: ghcr.io/vknabel/puffery-sendgrid-inbound-middleware/puffery-sendgrid-inbound-middleware:latest-nightly-18
restart: always
expose:
- 3000
depends_on:
- puffery
environment:
PUFFERY_NOTIFY_ADDRESS: http://puffery/api/v1/notify-inbound-email
db:
image: postgres:12.1-alpine
restart: always
container_name: db
volumes:
- ./data/db:/var/lib/postgresql/data/pgdata
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_USER: vapor_username
POSTGRES_PASSWORD: vapor_password
POSTGRES_DB: vapor_database
redis:
image: redis
restart: always
volumes:
- ./data/redis:/data
command: [ "redis-server", "--appendonly", "yes" ]