From 6d35f66e3502b61c0386f719d3a5f3caf0e109b6 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 29 Jul 2024 23:37:54 +0900 Subject: feat: separate Makefile and compose.yaml for local/prod envs --- compose.local.yaml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 compose.local.yaml (limited to 'compose.local.yaml') diff --git a/compose.local.yaml b/compose.local.yaml new file mode 100644 index 0000000..6e5604f --- /dev/null +++ b/compose.local.yaml @@ -0,0 +1,54 @@ +services: + api-server: + build: + context: ./backend + ports: + - '127.0.0.1:8002:80' + depends_on: + db: + condition: service_healthy + environment: + ALBATROSS_DB_HOST: db + ALBATROSS_DB_PORT: 5432 + ALBATROSS_DB_USER: postgres + ALBATROSS_DB_PASSWORD: eepei5reesoo0ov2ceelahd4Emi0au8ahJa6oochohheiquahweihoovahsee1oo + ALBATROSS_DB_NAME: albatross + restart: always + + db: + image: postgres:16.3 + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: eepei5reesoo0ov2ceelahd4Emi0au8ahJa6oochohheiquahweihoovahsee1oo + POSTGRES_DB: albatross + expose: + - 5432 + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres"] + interval: 10s + timeout: 5s + retries: 5 + volumes: + - db-data:/var/lib/postgresql/data + restart: always + + worker: + build: + context: ./worker + expose: + - 80 + restart: always + + tools: + build: + context: ./backend + dockerfile: ./Dockerfile.tools + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: eepei5reesoo0ov2ceelahd4Emi0au8ahJa6oochohheiquahweihoovahsee1oo + POSTGRES_DB: albatross + profiles: + - tools + +volumes: + db-data: -- cgit v1.2.3-70-g09d2