Skip to content
Snippets Groups Projects
Commit d3a725a5 authored by Andreas Burbach's avatar Andreas Burbach
Browse files

add docker

parent f919310c
No related branches found
No related tags found
1 merge request!1Merge feedingChickenWithChicken into main
version: "3"
services:
web:
build: ./solar
image: ${REGISTRY}/cn-tsn/project/solar/web:latest
volumes:
- ./solar:/code
\ No newline at end of file
version: '3'
services:
solar:
container_name: solar
build: ./solar
restart: always
command: sh -c "pipenv run python manage.py collectstatic --noinput && pipenv run uwsgi --socket=:9000 --module=solar.wsgi:application --py-autoreload=1"
volumes:
- ./solar:/code
networks:
- webnet
nginx:
container_name: nginx
image: nginx:latest
restart: always
depends_on:
- solar
- certbot
volumes:
- ./nginx/production/:/etc/nginx/conf.d
- ./solar/django_static/:/code/django_static
- ./solar/media/:/code/media
- ./fairing/build:/var/www/fairing
- ./nginx/certbot/conf:/etc/letsencrypt
- ./nginx/certbot/www:/var/www/certbot
networks:
- webnet
ports:
- "80:80"
- "443:443"
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot:latest
restart: unless-stopped
volumes:
- ./nginx/certbot/conf:/etc/letsencrypt
- ./nginx/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
webnet:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment