-
Notifications
You must be signed in to change notification settings - Fork 3
/
prod.yml
74 lines (70 loc) · 1.94 KB
/
prod.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
services:
proxy:
env_file:
- ./prod.env
build:
context: ./nginx
dockerfile: Dockerfile.prod
volumes:
- ./nginx/prod_templates:/etc/nginx/templates
- ./nginx/log:/var/log/nginx
- ./nginx/errors:/var/www/default
- letsencrypt:/etc/letsencrypt
logging:
driver: "json-file"
options:
max-size: "1k"
max-file: "3"
db:
build:
context: ./db
dockerfile: Dockerfile.prod
env_file:
- ./prod.env
backend:
build:
context: ./backend
dockerfile: Dockerfile.prod
env_file:
- ./prod.env
volumes:
- ./backend:/usr/src/app
- "/usr/src/app/node_modules"
ports:
- 4566:4566
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.prod
args:
NODE_ENV: ${NODE_ENV}
REACT_APP_S3_PHOTOS_RESOURCE_URL: ${REACT_APP_S3_PHOTOS_RESOURCE_URL}
REACT_APP_CDN_URL: ${REACT_APP_CDN_URL}
REACT_APP_PTR_MAIN_DOMAIN: ${REACT_APP_PTR_MAIN_DOMAIN}
REACT_APP_PTR_APP_SUBDOMAIN: ${REACT_APP_PTR_APP_SUBDOMAIN}
env_file:
- ./prod.env
volumes:
- "./frontend:/usr/src/app"
- "/usr/src/app/node_modules"
stdin_open: true
environment:
#assigns port to create-react-app
PORT: ${FRONTEND_PORT}
public_frontend:
build:
context: ./public_frontend
dockerfile: Dockerfile.prod
args:
NODE_ENV: ${NODE_ENV}
NEXT_PUBLIC_S3_PHOTOS_RESOURCE_URL: ${NEXT_PUBLIC_S3_PHOTOS_RESOURCE_URL}
NEXT_PUBLIC_CDN_URL: ${NEXT_PUBLIC_CDN_URL}
NEXT_PUBLIC_PTR_MAIN_DOMAIN: ${NEXT_PUBLIC_PTR_MAIN_DOMAIN}
NEXT_PUBLIC_PTR_APP_SUBDOMAIN: ${NEXT_PUBLIC_PTR_APP_SUBDOMAIN}
NEXT_PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID: ${NEXT_PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID}
env_file:
- ./prod.env
volumes:
- "./public_frontend:/usr/app"
- "/usr/app/node_modules"
- "/usr/app/.next"