-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
105 lines (99 loc) · 2.19 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: "3.9"
services:
db:
container_name: db
build:
context: .
dockerfile: containers/mysql/Dockerfile
# M1チップでも動くように
platform: linux/x86_64
# ローカルの/data/dbをコンテナの/var/lib/mysqlにマウンティング
volumes:
- db_data:/var/lib/mysql
# 環境変数
environment:
- MYSQL_ROOT_PASSWORD
- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
ports:
- "3306:3306"
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u$$MYSQL_USER -p$$MYSQL_PASSWORD
interval: 10s
timeout: 10s
retries: 3
start_period: 30s
app:
container_name: app
build:
context: .
dockerfile: containers/django/Dockerfile
volumes:
- ./application:/code
- ./static:/static
ports:
- "8000:8000"
# デバッグ用ポート
- "8080:8080"
command: sh -c "/usr/local/bin/entrypoint.sh"
stdin_open: true
tty: true
env_file:
- .env
depends_on:
db:
condition: service_healthy
mail:
container_name: mail
image: schickling/mailcatcher
ports:
- "1080:1080"
- "1025:1025"
celery:
container_name: celery
build:
context: .
dockerfile: containers/django/Dockerfile
volumes:
- ./application:/code
env_file:
- .env
command: poetry run celery -A application worker -l info
depends_on:
- app
- localstack
celery-beat:
container_name: celery-beat
build:
context: .
dockerfile: containers/django/Dockerfile
volumes:
- ./application:/code
env_file:
- .env
command: poetry run celery -A application beat -l info
depends_on:
- app
- localstack
localstack:
image: localstack/localstack
container_name: localstack
ports:
- "4566:4566"
environment:
- SERVICES=sns
- AWS_ACCESS_KEY_ID=localstack
- AWS_SECRET_ACCESS_KEY=localstack
- DEBUG=1
volumes:
- localstack_data:/tmp/localstack/data
- localstack_bin:/var/lib/localstack
volumes:
db_data:
static:
localstack_data:
localstack_bin:
networks:
default:
name: testnet