1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-22 14:54:22 +00:00
sophon/docker-compose.yml

100 lines
2.9 KiB
YAML
Raw Normal View History

version: "3.9"
volumes:
proxy-data:
django-static:
react-static:
db-data:
networks:
bone:
services:
db:
image: postgres
volumes:
- db-data:/var/lib/postgresql/data
environment:
# Don't change these.
- POSTGRES_USER=sophon
- POSTGRES_PASSWORD=sophonity
- POSTGRES_DB=sophon
networks:
- bone
frontend:
2021-10-20 18:28:27 +00:00
image: ghcr.io/steffo99/sophon-frontend:latest
environment:
- REACT_APP_DEFAULT_INSTANCE=http://api.dev.sophon.steffo.eu
networks:
- bone
backend:
2021-10-20 18:28:27 +00:00
image: ghcr.io/steffo99/sophon-backend:latest
environment:
2021-10-20 18:28:27 +00:00
# INSTALL: Set a random secret key!
- DJANGO_SECRET_KEY=change-me!!!
2021-10-20 18:28:27 +00:00
# INSTALL: Configure your allowed hosts!
- DJANGO_ALLOWED_HOSTS=api.dev.sophon.steffo.eu
2021-10-20 18:28:27 +00:00
# INSTALL: Configure your allowed origins! (* doesn't work)
- DJANGO_ALLOWED_ORIGINS=http://dev.sophon.steffo.eu
2021-10-20 18:28:27 +00:00
# INSTALL: Configure your proxy details!
- DJANGO_PROXY_BASE_DOMAIN=dev.sophon.steffo.eu
- DJANGO_PROXY_PROTOCOL=http
2021-10-20 18:28:27 +00:00
# INSTALL: Configure your static url!
- DJANGO_STATIC_URL=http://static.dev.sophon.steffo.eu/django-static/
2021-10-20 18:28:27 +00:00
# INSTALL: Set your language!
- DJANGO_LANGUAGE_CODE=en-us
2021-10-20 18:28:27 +00:00
# INSTALL: Set your timezone!
- DJANGO_TIME_ZONE=CET
2021-10-20 18:28:27 +00:00
# INSTALL: Set the superuser login details!
- DJANGO_SU_USERNAME=root
- DJANGO_SU_EMAIL=root@example.org
- DJANGO_SU_PASSWORD=square
# Don't change these.
2021-10-20 18:28:27 +00:00
- DJANGO_PROXY_CONTAINER_NAME=sophon-proxy-1
- DJANGO_DATABASE_ENGINE=django.db.backends.postgresql
2021-10-20 18:28:27 +00:00
- DJANGO_DATABASE_HOST=sophon-db-1
- DJANGO_DATABASE_USER=sophon
- DJANGO_DATABASE_PASSWORD=sophonity
- DJANGO_DATABASE_NAME=sophon
- DJANGO_AUTHENTICATION_BACKEND=django.contrib.auth.backends.ModelBackend
- DJANGO_DOCKER_CONTAINER_PREFIX=sophon-container
- DJANGO_DOCKER_VOLUME_PREFIX=sophon-volume
- DJANGO_DOCKER_NETWORK_PREFIX=sophon-network
- DJANGO_DOCKER_HOST=/var/run/docker.sock
- DJANGO_DOCKER_TLS_VERIFY=
- DJANGO_DOCKER_CERT_PATH=
volumes:
- proxy-data:/run/sophon/proxy
- django-static:/run/sophon/static
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- db
networks:
- bone
proxy:
2021-10-20 18:28:27 +00:00
image: ghcr.io/steffo99/sophon-proxy:latest
ports:
2021-10-20 18:28:27 +00:00
# INSTALL: Change this port based on your own needs!
- "30033:80"
environment:
2021-10-20 18:28:27 +00:00
# INSTALL: Configure your proxy details!
- APACHE_PROXY_BASE_DOMAIN=dev.sophon.steffo.eu
#`Don't change these.
2021-10-20 18:28:27 +00:00
- SOPHON_BACKEND_NAME=sophon-backend-1:8000
- SOPHON_FRONTEND_NAME=sophon-frontend-1:5000
volumes:
- proxy-data:/run/sophon/proxy
- django-static:/usr/local/apache2/htdocs/django-static
- react-static:/usr/local/apache2/htdocs/react-static
depends_on:
- backend
- frontend
networks:
- bone