-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.yml
141 lines (131 loc) · 2.72 KB
/
dev.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
version: "3.9"
x-common:
website:
&website
DJANGO_SETTINGS_MODULE: django_project.settings
SECRET_KEY: admin
FTP_URL: 0.0.0.0:21
USER: admin
PASSWORD: admin
EMAIL: admin@admin.com
postgres:
&postgres
POSTGRES_DB: website
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
redis:
&redis
REDIS_URL: redis:6379
services:
website:
image: marcpartensky/website
environment:
<<: *website
<<: *postgres
<<: *redis
VIRTUAL_HOST: website.dev
build:
context: .
dockerfile: ./Dockerfile
ports:
- "127.0.0.1:8000:80"
working_dir: /app
entrypoint: /app/entrypoint.sh
command: 80 0.0.0.0
volumes:
- ".:/app"
depends_on:
- redis
- postgres
networks:
- web
healthcheck:
test: ["CMD", "curl", "-fs", "http://website:80/robots.txt"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
postgres:
image: postgres
environment:
<<: *postgres
ports:
- "127.0.0.1:5432:5432"
networks:
- web
# pgadmin:
# image: dpage/pgadmin4
# restart: unless-stopped
# environment:
# PGADMIN_DEFAULT_EMAIL: admin@admin.com
# PGADMIN_DEFAULT_PASSWORD: admin
# VIRTUAL_HOST: postgres.dev
# volumes:
# - dev_pgadmin:/var/lib/pgadmin
# ports:
# - "15432:80"
# networks:
# - web
pgweb:
image: sosedoff/pgweb
restart: unless-stopped
ports:
- "127.0.0.1:15432:8081"
environment:
DATABASE_URL: "postgres://admin:admin@postgres:5432/website?sslmode=disable"
networks:
- web
depends_on:
- postgres
redis:
image: redis
environment:
<<: *redis
ports:
- "127.0.0.1:6379:6379"
networks:
- web
rediscommander:
image: rediscommander/redis-commander
restart: unless-stopped
environment:
VIRTUAL_HOST: redis.dev
REDIS_HOST: redis:6379
ports:
- "127.0.0.1:16379:8081"
networks:
- web
website-test:
environment:
<<: *website
# <<: *postgres
<<: *redis
VIRTUAL_HOST: website.dev
build:
context: .
dockerfile: ./Dockerfile
command: 80 0.0.0.0
networks:
- web
ports:
- "8080:80"
healthcheck:
test: ["CMD", "curl", "-fs", "http://website:80/robots.txt"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
test:
image: jwilder/dockerize
networks:
- web
command: -wait http://website:8080/healthcheck -timeout 120s -wait-retry-interval 5s
networks:
web:
caddy:
external: true
volumes:
dev_posgres:
dev_pgadmin: