-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
80 lines (72 loc) · 2.01 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
version: '2'
services:
# django:
# build: .
# container_name: django
# restart: always
# ports:
# - 8000:8000
# command: >
# sh -c "python manage.py runserver 0.0.0.0:8000"
# volumes:
# - django_static_volume:/usr/src/app/static
# - django_media_volume:/usr/src/app/media
# node:
# build: ./frontend
# container_name: node
# restart: always
# # порты
# ports:
# - 3000:3000
# command: yarn run dev
# depends_on:
# - django
# Сеть та же, все контейнеры должны крутиться в однйо сети чтобы видеть друг друга.
db:
image: postgres:16
container_name: postgres_container
ports:
- 5432:5432
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- PGDATA=${PGDATA}
volumes:
- ./db:/var/lib/postgresql/data/pgdata
networks:
- postgres_network
networks:
postgres_network: # Объявление сети
driver: bridge
# создаём два volume для статики
volumes:
django_static_volume:
django_media_volume:
# volumes:
# pg_project: 'Investor'
# services:
# pg_db:
# image: postgres
# restart: always
# environment:
# - POSTGRES_PASSWORD=Bulat31082003
# - POSTGRES_USER=postgres
# - POSTGRES_DB=InvestorHome
# volumes:
# - pg_project:/var/lib/postgresql/data
# ports:
# - ${POSTGRES_PORT:-5432}:5432
# web:
# image: registry.github.com/David2261/Investor:${CI_BUILD_REF_NAME}
# build: ./web
# environment:
# - SECRET_KEY
# command: uwsgi /usr/src/app/uwsgi.ini
# volumes:
# - static:/srv/static
# restart: unless-stopped
# test:
# image: registry.github.com/David2261/Investor:${CI_BUILD_REF_NAME}
# command: python3 manage.py test
# restart: 'no'