mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-23 08:22:15 +00:00
Version 1 dockerfile
Makes a VERY big image, I suspect we can optimise this a lot...
This commit is contained in:
52
compose.yml
Normal file
52
compose.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:17
|
||||
environment:
|
||||
POSTGRES_DB: ${DATABASE_NAME}
|
||||
POSTGRES_USER: ${DATABASE_USERNAME}
|
||||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
pyrigs:
|
||||
build: .
|
||||
container_name: pyrigs
|
||||
ports:
|
||||
- "8000:8000"
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
|
||||
DEBUG: ${DEBUG}
|
||||
DJANGO_LOGLEVEL: ${DJANGO_LOGLEVEL}
|
||||
DJANGO_ALLOWED_HOSTS: ${DJANGO_ALLOWED_HOSTS}
|
||||
DATABASE_ENGINE: ${DATABASE_ENGINE}
|
||||
DATABASE_NAME: ${DATABASE_NAME}
|
||||
DATABASE_USERNAME: ${DATABASE_USERNAME}
|
||||
|
||||
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
|
||||
DATABASE_HOST: ${DATABASE_HOST}
|
||||
DATABASE_PORT: ${DATABASE_PORT}
|
||||
env_file:
|
||||
- .env
|
||||
develop:
|
||||
# Create a `watch` configuration to update the app
|
||||
#
|
||||
watch:
|
||||
# Sync the working directory with the `/app` directory in the container
|
||||
- action: sync
|
||||
path: .
|
||||
target: /app
|
||||
# Exclude the project virtual environment
|
||||
ignore:
|
||||
- .venv/
|
||||
|
||||
# Rebuild the image on changes to the `pyproject.toml`
|
||||
- action: rebuild
|
||||
path: ./pyproject.toml
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user