-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
96 lines (91 loc) · 2.2 KB
/
docker-compose.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: '3'
services:
agent:
container_name: newrelic-infra
build:
context: ./newrelic-infra
dockerfile: newrelic-infra.dockerfile
cap_add:
- SYS_PTRACE
pid: host
privileged: true
volumes:
- '/:/host:ro'
- '/var/run/docker.sock:/var/run/docker.sock'
environment:
LICENSE_KEY: ${LICENSE_KEY}
restart: unless-stopped
networks:
- strapi_internal
nginx:
image: nginx:latest
restart: unless-stopped
container_name: nginx
ports:
- 80:80
- 443:443
networks:
- strapi_internal
volumes:
- ./conf/nginx/:/etc/nginx:ro
- ./logs/nginx/:/var/log/nginx
- /etc/localtime:/etc/localtime:ro
- ./.env:/opt/app/.env
depends_on:
- strapi
strapi:
container_name: strapi
build:
context: .
dockerfile: ./docker/${NODE_ENV}/Dockerfile
args:
NODE_ENV: ${NODE_ENV}
image: strapi:latest
restart: unless-stopped
env_file: .env
environment:
DATABASE_CLIENT: ${DATABASE_CLIENT}
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
APP_KEYS: ${APP_KEYS}
NODE_ENV: ${NODE_ENV}
volumes:
- ./config:/opt/app/config
- ./src:/opt/app/src
- ./package.json:/opt/app/package.json
- ./yarn.lock:/opt/app/yarn.lock
- ./.env:/opt/app/.env
- ./public/uploads:/opt/app/public/uploads
ports:
- '1337:1337'
networks:
- strapi_internal
depends_on:
- postgres
postgres:
image: postgres:latest
container_name: postgres
platform: linux/amd64
restart: unless-stopped
env_file: .env
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- strapi-data:/var/lib/postgresql/data/
ports:
- '5432:5432'
networks:
- strapi_internal
volumes:
strapi-data:
networks:
strapi_internal:
name: strapi_internal
driver: bridge