diff --git a/.gitignore b/.gitignore index 4235295..4404f4c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ setup ops/.env.dev ops/.env.prod src/.env +src/docker-compose.yml # folders _ diff --git a/Makefile b/Makefile index 5adcae2..faa33c0 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,10 @@ SHELL := /bin/bash SRC := $(shell os=$$(uname -s); \ if [ "$$os" = "Linux" ]; then \ cp ./ops/.env.prod ./src/.env; \ + cp ./docker-prod.yml ./src/docker-compose.yml; \ elif [ "$$os" = "Darwin" ]; then \ cp ./ops/.env.dev ./src/.env; \ + cp ./docker-dev.yml ./src/docker-compose.yml; \ else \ exit 1; \ fi) @@ -79,7 +81,6 @@ up: @if [ "$$(uname -s)" = "Linux" ]; then \ if [ -f ops/.env.prod ]; then \ echo -e "\033[31mStarting container in prod environment...\033[0m"; \ - cp $(EP) $(ENF) 2>/dev/null || :; \ docker pull $(DIN):$(DIV); \ docker compose -f $(DCF) --env-file $(EF) up -d; \ else \ @@ -89,7 +90,6 @@ up: elif [ "$$(uname -s)" = "Darwin" ]; then \ if [ -f ops/.env.prod ]; then \ echo -e "\033[31mStarting container in dev environment...\033[0m"; \ - cp $(ED) $(ENF) 2>/dev/null || :; \ docker compose -f $(DCF) --env-file $(EF) up -d; \ else \ echo -e "\033[31menv file for dev missing.\033[0m"; \ diff --git a/src/docker-compose.yml b/src/docker-compose.yml deleted file mode 100644 index df337cc..0000000 --- a/src/docker-compose.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Services -services: - - dtc-app: - container_name: ${CN} - image: ${DIN}:${DIV} - restart: unless-stopped - env_file: .env - labels: - logging: "promtail" - logging_jobname: "containerlogs" - ports: - - 1017:443 - networks: - - bams - volumes: - - .:/var/www - - ../ops/docker/nginx/dtc.conf:/etc/nginx/conf.d/default.conf - - ~/dev/keys/mac/bams.pem:/var/ssl/cert.pem - - ~/dev/keys/mac/bams-key.pem:/var/ssl/key.pem - -networks: - bams: - name: bams - external: true \ No newline at end of file