-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yaml
58 lines (58 loc) · 1.83 KB
/
docker-compose.dev.yaml
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
version: '3.9'
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.prod
args:
- PUBLIC_URL=${PUBLIC_URL:-http://localhost}
- REACT_APP_SERVER_URL=${REACT_APP_SERVER_URL:-http://localhost:8000/api}
- REACT_APP_SENTRY_DSN=${REACT_APP_SENTRY_DSN:-}
- REACT_APP_BASENAME=${REACT_APP_BASENAME:-/}
- SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN:-}
container_name: 'studies-search_frontend_container'
ports:
- '${SSF_HOST_PORT:-80}:80'
depends_on:
- backend
restart: always
backend:
build:
context: ./
dockerfile: Dockerfile.prod
container_name: 'studies-search_backend_container'
environment:
- ALLOWED_HOSTS=${ALLOWED_HOSTS:-127.0.0.1}
- SECRET_KEY=${SECRET_KEY}
- ADMINS=${ADMINS}
- SCRIPT_NAME=${SCRIPT_NAME:-}
- CORS_ORIGIN_WHITELIST=${CORS_ORIGIN_WHITELIST:-http://localhost}
- DATABASE_URL=postgres://user:password@database/studies-search
- GOOGLE_DRIVE_STORAGE_JSON_KEY_FILE=/run/secrets/google_service_account
- EMAIL_HOST=${EMAIL_HOST}
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
secrets:
- google_service_account
depends_on:
- database
volumes:
- ./logs:/usr/src/app/logs
ports:
- '${SSB_HOST_PORT:-8000}:8000'
command: ['sh', '/usr/src/app/entrypoint.sh']
restart: always
database:
image: 'postgres:15-alpine'
container_name: 'studies-search_postgresql_container'
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- POSTGRES_DB=studies-search
volumes:
- ./postgresql/mount/:/var/lib/postgresql/data
restart: always
secrets:
google_service_account:
file: ./studies-search-service-account.json
# docker compose up --build --detach