Skip to content

Commit

Permalink
fix(docker): move env to main yml, add names to fix db backup
Browse files Browse the repository at this point in the history
  • Loading branch information
berdal84 committed Apr 26, 2024
1 parent ba4389a commit 179c1d7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
4 changes: 0 additions & 4 deletions api/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ services:
api:
build:
context: .
tags:
- "seeking/api:DEV"
volumes:
- .:/app/
environment:
DEBUG: True
restart: on-failure
ports:
- 8000:8000
8 changes: 1 addition & 7 deletions db/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
services:
db:
image: postgres:14
environment:
POSTGRES_DB: seeking
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
healthcheck:
#
# This container can be up be not ready to accept connections, we run a healthcheck.
Expand All @@ -18,7 +12,7 @@ services:
#
# See doc: https://docs.docker.com/reference/dockerfile/#healthcheck
#
test: ["CMD-SHELL", "pg_isready -U postgres"]
test: ["CMD-SHELL", "pg_isready"]
start_interval: 1s
start_period: 5s
interval: 5s
Expand Down
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,26 @@ services:
#--------------------------------------------------------------------------------------------
#
webui:
container_name: 'seeking-webui'
restart: on-failure
profiles: ['webui', '']
extends:
file: ./webui/docker-compose.dev.yml
service: webui
build:
args:
- API_BASE_URL=http://127.0.0.1:8000
ports:
- 3000:3000
#
#--------------------------------------------------------------------------------------------
#
api:
container_name: 'seeking-api'
restart: on-failure
profiles: ['api', '']
ports:
- 8000:8000
environment:
DATABASE_HOST: db
APP_HOST: api
Expand All @@ -64,11 +73,18 @@ services:
#--------------------------------------------------------------------------------------------
#
db:
container_name: 'seeking-db'
restart: always
environment:
POSTGRES_DB: seeking
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
# profile: always active
extends:
file: ./db/docker-compose.dev.yml
service: db
ports:
- 5432 # internal only
#
#--------------------------------------------------------------------------------------------
#
File renamed without changes.
12 changes: 6 additions & 6 deletions webui/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ services:
webui:
build:
context: .
tags:
- "seeking/webui:DEV"
args:
- API_BASE_URL=http://127.0.0.1:8000
ports:
- 3000:3000
dockerfile: Dockerfile.standalone
#
# You can override this at build time
#
# args:
# - API_BASE_URL=<host>:<port>

0 comments on commit 179c1d7

Please sign in to comment.