@@ -14,14 +14,6 @@ volumes:
1414 reports-data :
1515 nginx-conf :
1616services :
17- # smtp:
18- # image: catatnight/postfix
19- # hostname: postfix
20- # environment:
21- # # You could change this to something more suitable
22- # - maildomain=kartoza.com
23- # - smtp_user=noreply:docker
24- # restart: unless-stopped
2517
2618 db :
2719 image : kartoza/postgis:16-3.4
@@ -35,12 +27,17 @@ services:
3527 restart : unless-stopped
3628 ports :
3729 - " 7543:5432"
30+ networks :
31+ internal :
3832
3933 uwsgi : &uwsgi-common
34+ image : ${UWSGI_DOCKER_IMAGE}
4035 build :
4136 context : ${PWD}/../
4237 dockerfile : deployment/docker/Dockerfile
4338 target : prod
39+ expose :
40+ - " 8080"
4441 environment :
4542 - DATABASE_NAME=${DATABASE_NAME}
4643 - DATABASE_USERNAME=${DATABASE_USERNAME}
@@ -71,6 +68,7 @@ services:
7168 - static-data:/home/web/static:rw
7269 - media-data:/home/web/media:rw
7370 - reports-data:/home/web/reports
71+ - ./docker/uwsgi.conf:/uwsgi.conf
7472 command : bash -c "npm install && npm run build && uwsgi --ini /uwsgi.conf"
7573 links :
7674 - db:db
@@ -82,6 +80,8 @@ services:
8280 options :
8381 max-size : " 10m"
8482 max-file : " 10"
83+ networks :
84+ internal :
8585
8686 dbbackups :
8787 image : kartoza/pg-backup:16-3.4
@@ -102,14 +102,25 @@ services:
102102 - POSTGRES_HOST=${DATABASE_HOST}
103103 - PGDATABASE=${DATABASE_NAME}
104104 restart : unless-stopped
105+ networks :
106+ internal :
105107
106108 # This is normally the main entry point for a production server
107109 web :
108110 image : nginx
111+ entrypoint :
112+ - /etc/nginx/sites-available/docker-entrypoint.sh
113+ ports :
114+ - " 80:80"
115+ - " 443:443"
116+ command :
117+ - ${WEB_ENV}
109118 volumes :
110- - nginx-conf:/etc/nginx/conf.d :ro
119+ - nginx-conf:/etc/nginx/sites-available/ :ro
111120 - static-data:/home/web/static:ro
112121 - media-data:/home/web/media:ro
122+ - ./webroot:/var/www/webroot
123+ - ./certbot-etc:/etc/letsencrypt
113124 links :
114125 - uwsgi:uwsgi
115126 restart : unless-stopped
@@ -118,6 +129,8 @@ services:
118129 options :
119130 max-size : " 10m"
120131 max-file : " 10"
132+ networks :
133+ internal :
121134
122135 # This is the entry point for a development server.
123136 # Run with --no-deps to run attached to the services
@@ -130,6 +143,8 @@ services:
130143 target : dev
131144 ports :
132145 - " 62202:8000"
146+ networks :
147+ internal :
133148
134149 webpack :
135150 build :
@@ -142,5 +157,21 @@ services:
142157 - ../django_project:/home/web/django_project
143158 - static-data:/home/web/static:rw
144159 - ${MEDIA_VOLUME}:/home/web/media:rw
160+ networks :
161+ internal :
162+
163+ certbot :
164+ image : certbot/certbot
165+ container_name : certbot
166+ volumes :
167+ - ./webroot:/var/www/webroot
168+ - ./certbot-etc:/etc/letsencrypt
169+ depends_on :
170+ - web
171+ command : certonly --webroot --webroot-path=/var/www/webroot --email admin@qgis.org --agree-tos --no-eff-email --force-renewal -d ${VIRTUAL_HOST:-changelog.qgis.org}
172+ networks :
173+ internal :
145174
146175
176+ networks :
177+ internal:
0 commit comments