-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
55 lines (53 loc) · 1.83 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
55 lines (53 loc) · 1.83 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
services:
django:
depends_on:
db:
condition: service_healthy
environment:
- PRIVATE_ACCOUNT_KEY=$PRIVATE_ACCOUNT_KEY
- PROVIDER_URL=$PROVIDER_URL
- CONTRACT_ADDRESS=$CONTRACT_ADDRESS
command: /bin/sh -c '
cp /tmp/make_db_setting.sh ./backend/make_db_setting.sh &&
sh ./backend/make_db_setting.sh &&
cd backend &&
python manage.py makemigrations accounts &&
python manage.py makemigrations tournament &&
python manage.py makemigrations friend &&
python manage.py makemigrations pong &&
python manage.py makemigrations users &&
python manage.py makemigrations notification &&
python manage.py makemigrations &&
python manage.py migrate &&
(python manage.py loaddata ./**/fixtures/initial_data_prod.json || echo '') &&
(celery -A ft_trans worker -B -l info)&
(celery -A ft_trans beat -l info)&
(cd frontend && npm install && npm run build) &&
cd backend && daphne -e ssl:8000:privateKey=/tmp/server.key:certKey=/tmp/server.crt ft_trans.asgi:application
'
db:
container_name: 'db'
build:
context: ./docker/db
dockerfile: Dockerfile
networks:
- db_net
tty: true
volumes:
- ./db_volume/:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_DJANGO_USER=$POSTGRES_DJANGO_USER
- POSTGRES_DJANGO_PASSWORD=$POSTGRES_DJANGO_PASSWORD
- POSTGRES_DJANGO_DB_NAME=$POSTGRES_DJANGO_DB_NAME
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 3s
timeout: 1s
retries: 5
eth:
environment:
- PRIVATE_ACCOUNT_KEY=$PRIVATE_ACCOUNT_KEY
- PROVIDER_URL=$PROVIDER_URL
- CONTRACT_ADDRESS=$CONTRACT_ADDRESS
command: /bin/sh -c "npx hardhat compile && tail -f /dev/null"