-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-ghcr.yml
56 lines (55 loc) · 1.25 KB
/
docker-compose-ghcr.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
version: '3.9'
services:
db:
image: postgres
ports:
- 5432:5432
restart: always
shm_size: 128mb
volumes:
- lpms_db:/var/lib/postgresql/data
env_file:
- path: ./.env
required: true
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
# adminer:
# image: adminer
# restart: always
# ports:
# - 8080:8080
app:
image: ghcr.io/mmmylnikov/lpms:latest
restart: always
depends_on:
- db
command: sh -c "python manage.py migrate &&
python manage.py collectstatic --noinput &&
gunicorn config.wsgi:application --bind 0.0.0.0:8000"
volumes:
- lpms_static:/usr/src/app/shared/static
- lpms_media:/usr/src/app/shared/media
- lpms_nginx_conf:/usr/src/app/shared/nginx
expose:
- 8000
env_file:
- path: ./.env
required: true
nginx:
image: nginx:latest
restart: always
ports:
- 8080:80
depends_on:
- app
volumes:
- lpms_static:/shared/static
- lpms_media:/shared/media
- lpms_nginx_conf:/etc/nginx/conf.d/
volumes:
lpms_db:
lpms_static:
lpms_media:
lpms_nginx_conf: