-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
92 lines (87 loc) · 2.47 KB
/
docker-compose.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
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
services:
web:
build: .
container_name: django
volumes:
- .:/home/app/web
- ./auctions/static:/home/app/web/staticfiles
- ./mediafiles:/home/app/web/mediafiles
- ./logs:/home/logs
expose:
- 8000
env_file: .env
depends_on:
- db
restart: always
test:
build:
context: .
dockerfile: Dockerfile
target: test
volumes:
- .:/home/app/web
entrypoint: [/bin/bash, /home/app/web/.github/scripts/test-and-lint.sh]
env_file: .env
profiles: [test]
db:
container_name: db
image: mariadb:latest
restart: always
command:
- "--max_connections=10000"
- "--max_allowed_packet=16M"
- "--wait_timeout=315M"
- "--interactive_timeout=315M"
- "--open_files_limit=100000"
- "--net_read_timeout=315M"
- "--net_write_timeout=315M"
environment:
MYSQL_DATABASE: ${DATABASE_NAME-auctions}
MYSQL_USER: ${DATABASE_USER-mysqluser}
MYSQL_PASSWORD: ${DATABASE_PASSWORD-unsecure}
MYSQL_ROOT_PASSWORD: ${DATABASE_ROOT_PASSWORD-unsecure}
expose:
- ${DATABASE_PORT-3306}
volumes:
- mariadb_data:/var/lib/mysql
redis:
container_name: redis
image: redis
environment:
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
expose:
- 6379
volumes:
- redis_data:/bitnami/redis/data
restart: always
command: redis-server --requirepass ${REDIS_PASSWORD-unsecure}
nginx:
container_name: nginx
image: ${NGINX_IMAGE-nginx}:latest # default setting is for development, use lscr.io/linuxserver/swag for production
volumes:
# the root conf file is set for dev, but for production use:
# NGINX_CONF='./nginx.prod.conf'
# NGINX_CONF_LOCATION='/config/nginx/site-confs/default.conf'
- ${NGINX_CONF-./nginx.dev.conf}:${NGINX_CONF_LOCATION-/etc/nginx/nginx.conf}
- ./swag:/config
- ./nginx_fishauctions.conf:/etc/nginx/nginx_fishauctions.conf:ro
- ./auctions/static:/home/app/web/staticfiles:ro
- ./mediafiles:/home/app/web/mediafiles:ro
ports:
- ${HTTP_PORT-80}:80
- ${SSL_PORT-443}:443 # this is only used in production
restart: always
depends_on:
- web
cap_add:
- NET_ADMIN
environment: # none of these get used in development
- PUID=${PUID-1000}
- PGID=${PGID-1000}
- TZ=Etc/UTC
- URL=${SITE_DOMAIN}
- VALIDATION=http
- EMAIL=${ADMIN_EMAIL}
volumes:
redis_data:
mariadb_data: