From 8c70b88662194661ac0f7e1d93c3221deef01fae Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 6 Jun 2022 13:37:06 -0500 Subject: [PATCH] add nas and linode docker compose --- .../docker_compose_up_django.xml | 12 ++-- .../docker_compose_up_django__1_.xml | 17 +++++ .../docker_compose_up_docs.xml | 12 ++-- linode.yml | 68 +++++++++++++++++++ nas.yml | 66 ++++++++++++++++++ 5 files changed, 163 insertions(+), 12 deletions(-) create mode 100644 .idea/runConfigurations/docker_compose_up_django__1_.xml create mode 100644 linode.yml create mode 100644 nas.yml diff --git a/.idea/runConfigurations/docker_compose_up_django.xml b/.idea/runConfigurations/docker_compose_up_django.xml index a0a02ac..dc9cd29 100644 --- a/.idea/runConfigurations/docker_compose_up_django.xml +++ b/.idea/runConfigurations/docker_compose_up_django.xml @@ -1,16 +1,16 @@ - + - - - + - + \ No newline at end of file diff --git a/.idea/runConfigurations/docker_compose_up_django__1_.xml b/.idea/runConfigurations/docker_compose_up_django__1_.xml new file mode 100644 index 0000000..8d03be4 --- /dev/null +++ b/.idea/runConfigurations/docker_compose_up_django__1_.xml @@ -0,0 +1,17 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/docker_compose_up_docs.xml b/.idea/runConfigurations/docker_compose_up_docs.xml index 0f77b28..22f767f 100644 --- a/.idea/runConfigurations/docker_compose_up_docs.xml +++ b/.idea/runConfigurations/docker_compose_up_docs.xml @@ -1,16 +1,16 @@ - + - - - + - + \ No newline at end of file diff --git a/linode.yml b/linode.yml new file mode 100644 index 0000000..21317bc --- /dev/null +++ b/linode.yml @@ -0,0 +1,68 @@ +version: '3' + +volumes: + benchcoach_local_postgres_data: {} + benchcoach_local_postgres_data_backups: {} + +services: + django: + build: + context: . + dockerfile: ./compose/local/django/Dockerfile + image: benchcoach_local_django + container_name: benchcoach_local_django + platform: linux/x86_64 + depends_on: + - postgres + volumes: + - /root/teamsnap-benchcoach:/app:z + env_file: + - ./.envs/.linode/.django + - ./.envs/.linode/.postgres + ports: + - "8000:8000" + command: /start + + postgres: + build: + context: . + dockerfile: ./compose/production/postgres/Dockerfile + image: benchcoach_production_postgres + container_name: benchcoach_local_postgres + volumes: + - benchcoach_local_postgres_data:/var/lib/postgresql/data:Z + - benchcoach_local_postgres_data_backups:/backups:z + env_file: + - ./.envs/.linode/.postgres + + docs: + image: benchcoach_local_docs + container_name: benchcoach_local_docs + platform: linux/x86_64 + build: + context: . + dockerfile: ./compose/local/docs/Dockerfile + env_file: + - ./.envs/.linode/.django + volumes: + - /root/teamsnap-benchcoach/docs:/docs:z + - /root/teamsnap-benchcoach/config:/app/config:z + - /root/teamsnap-benchcoach/benchcoach:/app/benchcoach:z + ports: + - "9000:9000" + command: /start-docs + + nginx-proxy: + image: jwilder/nginx-proxy:alpine + container_name: nginx-proxy + ports: + - "80:80" + - "443:443" + volumes: + - /var/run/docker.sock:/tmp/docker.sock:ro + - /root/teamsnap-benchcoach/certs:/etc/nginx/certs + env_file: + - ./.envs/.linode/.nginx-proxy + restart: always + depends_on: + - django diff --git a/nas.yml b/nas.yml new file mode 100644 index 0000000..9d0387b --- /dev/null +++ b/nas.yml @@ -0,0 +1,66 @@ +version: '3' + +volumes: + benchcoach_local_postgres_data: {} + benchcoach_local_postgres_data_backups: {} + +services: + django: + build: + context: . + dockerfile: ./compose/local/django/Dockerfile + image: benchcoach_local_django + container_name: benchcoach_local_django + platform: linux/x86_64 + depends_on: + - postgres + volumes: + - /volume1/docker/benchcoach_nas:/app:z + env_file: + - ./.envs/.local/.django + - ./.envs/.local/.postgres + ports: + - "8000:8000" + command: /start + + postgres: + build: + context: . + dockerfile: ./compose/production/postgres/Dockerfile + image: benchcoach_production_postgres + container_name: benchcoach_local_postgres + volumes: + - benchcoach_local_postgres_data:/var/lib/postgresql/data:Z + - benchcoach_local_postgres_data_backups:/backups:z + env_file: + - ./.envs/.local/.postgres + + docs: + image: benchcoach_local_docs + container_name: benchcoach_local_docs + platform: linux/x86_64 + build: + context: . + dockerfile: ./compose/local/docs/Dockerfile + env_file: + - ./.envs/.local/.django + volumes: + - /volume1/docker/benchcoach_nas/docs:/docs:z + - /volume1/docker/benchcoach_nas/config:/app/config:z + - /volume1/docker/benchcoach_nas/benchcoach:/app/benchcoach:z + ports: + - "9000:9000" + command: /start-docs + + nginx-proxy: + image: jwilder/nginx-proxy:alpine + container_name: nginx-proxy + ports: + - "8001:80" + - "8002:443" + volumes: + - /var/run/docker.sock:/tmp/docker.sock:ro + - /volume1/docker/benchcoach_nas/certs:/etc/nginx/certs + restart: always + depends_on: + - django