-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
72 lines (70 loc) · 1.81 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
version: "3.8"
services:
cards:
image: cards:0.1.1
container_name: cards
build:
context: ./app
target: production
dockerfile: Dockerfile
working_dir: /app
restart: unless-stopped
env_file: .env
environment:
TZ: Europe/Helsinki
APP_NAME: ${APP_NAME}
APP_DESCRIPTION: ${APP_DESCRIPTION}
APP_KEYWORDS: ${APP_KEYWORDS}
APP_URL: ${APP_URL}
STRAPI_API_URL: ${STRAPI_API_URL}
STRAPI_API_TOKEN: ${STRAPI_API_TOKEN}
volumes:
- ./app:/app
- /app/node_modules
ports:
- 3000:3000
strapi:
image: strapi:4.24.1
container_name: strapi
build:
context: ./strapi
target: production
dockerfile: Dockerfile
restart: unless-stopped
env_file: .env
environment:
DATABASE_CLIENT: ${DATABASE_CLIENT}
DATABASE_HOST: strapi_db
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}
STRAPI_TELEMETRY_DISABLED: 1
volumes:
- ./strapi/config:/opt/app/config
- ./strapi/src:/opt/app/src
- ./strapi/package.json:/opt/package.json
- ./strapi/yarn.lock:/opt/yarn.lock
- ./.env:/opt/app/.env
- ./strapi/public:/opt/app/public
ports:
- 1337:1337
depends_on:
- strapi_db
strapi_db:
image: postgres:alpine
container_name: strapi_db
# platform: linux/amd64
restart: unless-stopped
env_file: .env
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- ./db:/var/lib/postgresql/data/
ports:
- 5432:5432