Skip to content

Commit

Permalink
Remove complexity of deploy by multiple docker-compose files
Browse files Browse the repository at this point in the history
  • Loading branch information
trchopan committed Jul 4, 2024
1 parent 5a96835 commit 643a84a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 57 deletions.
25 changes: 0 additions & 25 deletions compose.sh

This file was deleted.

3 changes: 3 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker compose -f docker-compose.prod.yaml up -d --build
14 changes: 0 additions & 14 deletions docker-compose.base.yaml

This file was deleted.

20 changes: 11 additions & 9 deletions docker-compose.prod.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
services:
app:
build: .
restart: always
environment:
- APP_ENV=$APP_ENV
- PHX_SERVER=true
- PHX_HOST=$HOST
- DATABASE_URL=ecto://root:[email protected]:5432/liveprompt_dev
- SECRET_KEY_BASE="$SECRET_KEY_BASE"
- SENDGRID_API_KEY="$SENDGRID_API_KEY"
- PORT=8080
ports:
- 8083:8080
extra_hosts:
- 'host.docker.internal:host-gateway'
command: /app/bin/liveprompt start

database:
image: 'postgres:15'
volumes:
- ./db-data:/var/lib/postgresql/data/
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: password
POSTGRES_DB: liveprompt_dev
9 changes: 0 additions & 9 deletions docker-compose.dev.yaml → docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
services:
app:
build: .
environment:
- DATABASE_URL=ecto://root:password@database:5432/liveprompt_dev
- PORT=8080
ports:
- 8080:8080
command: tail -f /dev/null

database:
image: 'postgres:15'
volumes:
Expand Down

0 comments on commit 643a84a

Please sign in to comment.