mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
add devcontainer configs and docker network orchestration
This commit is contained in:
72
docker-compose.devcontainer.yml
Normal file
72
docker-compose.devcontainer.yml
Normal file
@@ -0,0 +1,72 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
container_name: db
|
||||
image: postgres:13.4
|
||||
volumes:
|
||||
- ./devcontainer-api/initdb:/docker-entrypoint-initdb.d
|
||||
environment:
|
||||
PGGSSENCMODE: disable
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: chummy
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
ports:
|
||||
- "5432:5432"
|
||||
expose:
|
||||
- "5432"
|
||||
command:
|
||||
- "postgres"
|
||||
- "-c"
|
||||
- "listen_addresses=*"
|
||||
restart: always
|
||||
redis:
|
||||
container_name: redis
|
||||
image: redis:6.2
|
||||
restart: always
|
||||
command: redis-server --port 6380
|
||||
ports:
|
||||
- "6380:6380"
|
||||
expose:
|
||||
- "6380"
|
||||
dev:
|
||||
container_name: dev
|
||||
image: dev-notification-api
|
||||
build:
|
||||
context: .
|
||||
dockerfile: devcontainer-api/Dockerfile
|
||||
env_file: .env
|
||||
volumes:
|
||||
- .:/workspace:cached
|
||||
command: sleep infinity
|
||||
ports:
|
||||
- 6011:6011
|
||||
expose:
|
||||
- "6011"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
links:
|
||||
- db
|
||||
restart: always
|
||||
worker:
|
||||
container_name: worker
|
||||
image: dev-notification-api
|
||||
build:
|
||||
context: .
|
||||
dockerfile: devcontainer-api/Dockerfile
|
||||
env_file: .env
|
||||
volumes:
|
||||
- .:/workspace:cached
|
||||
command: sleep infinity
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- dev
|
||||
links:
|
||||
- db
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: notify-network
|
||||
external: true
|
||||
Reference in New Issue
Block a user