-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (72 loc) · 2.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (72 loc) · 2.53 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: goupixdex
services:
mariadb:
container_name: goupixdex-mariadb
image: mariadb:11
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootsecret}
MYSQL_DATABASE: ${MYSQL_DATABASE:-goupixdex}
MYSQL_USER: ${MYSQL_USER:-goupix}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-goupix}
ports:
- "${MYSQL_PORT:-3306}:3306"
volumes:
- mariadb_data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 5s
retries: 10
api:
build:
context: ..
dockerfile: api/Dockerfile
image: goupixdex-api:latest
container_name: goupixdex-api
restart: unless-stopped
ports:
- "${API_PORT:-8000}:8000"
environment:
# Fixed host "mariadb" (service name). Do not pass ${DATABASE_URL} from host .env here:
# that often points to 127.0.0.1 and breaks inside the container.
DATABASE_URL: mysql+pymysql://goupix:goupix@mariadb:3306/goupixdex
JWT_SECRET: ${JWT_SECRET:-change-me-in-production}
SEED_USER_EMAIL: ${SEED_USER_EMAIL:-}
SEED_USER_PASSWORD: ${SEED_USER_PASSWORD:-}
POKE_WALLET_API_KEY: ${POKE_WALLET_API_KEY:-}
POKE_WALLET_BASE_URL: ${POKE_WALLET_BASE_URL:-https://api.pokewallet.io}
POKE_WALLET_PROXY_SECRET: ${POKE_WALLET_PROXY_SECRET:-}
POKE_WALLET_USER_AGENT: "${POKE_WALLET_USER_AGENT:-GoupixDex/1.0 (+https://goupixdex.dibodev.fr)}"
GROQ_API_KEY: ${GROQ_API_KEY:-}
SUPABASE_URL: ${SUPABASE_URL:-}
SUPABASE_API_KEY: ${SUPABASE_API_KEY:-}
SUPABASE_STORAGE_BUCKET: ${SUPABASE_STORAGE_BUCKET:-GoupixDex}
VINTED_EMAIL_OR_USERNAME: ${VINTED_EMAIL_OR_USERNAME:-}
VINTED_PASSWORD: ${VINTED_PASSWORD:-}
VINTED_BROWSER_HEADLESS: ${VINTED_BROWSER_HEADLESS:-false}
VINTED_CHROME_EXECUTABLE: ${VINTED_CHROME_EXECUTABLE:-/usr/bin/chromium}
volumes:
- .:/app
depends_on:
mariadb:
condition: service_healthy
command: >
sh -c "python migrations/run_migrations.py &&
python seeders/conditional_seed.py &&
xvfb-run -a --server-args='-screen 0 1920x1080x24'
uvicorn main:app --host 0.0.0.0 --port 8000 --reload"
phpmyadmin:
container_name: goupixdex-phpmyadmin
image: phpmyadmin:5
restart: unless-stopped
environment:
PMA_HOST: mariadb
PMA_USER: root
PMA_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootsecret}
ports:
- "${PHPMYADMIN_PORT:-8080}:80"
depends_on:
- mariadb
volumes:
mariadb_data: