-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
184 lines (174 loc) · 4.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
184 lines (174 loc) · 4.53 KB
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
services:
postgres:
image: postgres:15.5-alpine3.18
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: mustachebash
PGDATA: "/var/lib/postgresql/data/pgdata"
volumes:
- type: bind
source: ./postgres-data
target: /var/lib/postgresql/data
- type: bind
source: ./schema/v1schema.sql
target: /docker-entrypoint-initdb.d/schema.sql
ports:
- target: 5432
published: 5432
protocol: tcp
mode: host
api-installer:
build:
context: api
target: build-deps
image: mustachebash-api:dev
pull_policy: never
command: sh -c "rm -rf /mustachebash/dist"
environment:
NODE_ENV: development
volumes:
- type: bind
source: ./api
target: /mustachebash
- type: volume
target: /mustachebash/node_modules
api:
depends_on:
nginx:
condition: service_started
postgres:
condition: service_started
api-installer:
condition: service_completed_successfully
image: mustachebash-api:dev
pull_policy: never
tty: true
volumes_from:
- api-installer
command: npm run dev
env_file:
- ./secrets/.env
environment:
- NODE_ENV=development
- NODE_OPTIONS="--no-deprecation"
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USERNAME=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DATABASE=mustachebash
- GOOGLE_IDENITY_CLIENT_ID="198337388430-lc8hopgbqp8d1s4eajfqjhli3g5kbk2r.apps.googleusercontent.com"
- JWT_SECRET=development
- JWT_ORDER_SECRET=development
- JWT_TICKET_SECRET=development
- MAILGUN_DOMAIN=sales.mustachebash.com
- MAILGUN_API_KEY
- MAILCHIMP_DOMAIN=us10.api.mailchimp.com
- MAILCHIMP_API_KEY
- BRAINTREE_ENV=Sandbox
- BRAINTREE_MERCHANT_ID
- BRAINTREE_PUBLIC_KEY
- BRAINTREE_PRIVATE_KEY
web-installer:
build:
context: mustachebash.com
target: build-deps
image: mustachebash-web:dev
pull_policy: never
command: sh -c "rm -rf /build/dist /build/.astro"
environment:
NODE_ENV: development
volumes:
- type: bind
source: ./mustachebash.com
target: /build
- type: volume
target: /build/node_modules
web:
depends_on:
nginx:
condition: service_started
web-installer:
condition: service_completed_successfully
image: mustachebash-web:dev
pull_policy: never
tty: true
volumes_from:
- web-installer
command: npm start
admin-installer:
build:
context: admin
target: build-deps
image: mustachebash-admin:dev
pull_policy: never
command: sh -c "rm -rf /build/dist"
environment:
NODE_ENV: development
volumes:
- type: bind
source: ./admin
target: /build
- type: volume
target: /build/node_modules
admin:
depends_on:
nginx:
condition: service_started
admin-installer:
condition: service_completed_successfully
image: mustachebash-admin:dev
pull_policy: never
tty: true
volumes_from:
- admin-installer
command: npm start
# This is just for https
nginx:
image: nginx:1.27.3-alpine
ports:
- "443:443"
- "80:80"
volumes:
- type: bind
read_only: true
source: ./nginx-dev.conf
target: /etc/nginx/conf.d/default.conf
- type: bind
read_only: true
source: ./secrets/localhost-cert.pem
target: /etc/nginx/certs/localhost-cert.pem
- type: bind
read_only: true
source: ./secrets/localhost-key.pem
target: /etc/nginx/certs/localhost-key.pem
# This is for analytics
# docker run -d -p 3000:3000 --name metabase metabase/metabase
# metabase:
# image: metabase/metabase
# ports:
# - "3000:3000"
# environment:
# MB_DB_TYPE: postgres
# MB_DB_DBNAME: metabaseappdb
# MB_DB_PORT: 5432
# MB_DB_USER: metabase
# MB_DB_PASS: postgres
# MB_DB_HOST: mbpostgres
# mbpostgres:
# image: postgres:15.5-alpine3.18
# environment:
# POSTGRES_USER: metabase
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: metabaseappdb
# PGDATA: "/var/lib/postgresql/data/pgdata"
# ports:
# - target: 5432
# published: 5433
# protocol: tcp
# mode: host
# volumes:
# - type: volume
# source: metabasedb
# target: /var/lib/postgresql/data
# volumes:
# metabasedb: