feat: Add initial local Docker Swarm deployment setup and frontend application structure with project state management.
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
This commit is contained in:
68
deploy/local/docker-compose.yml
Normal file
68
deploy/local/docker-compose.yml
Normal file
@@ -0,0 +1,68 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:14-alpine
|
||||
environment:
|
||||
POSTGRES_USER: evrak_user
|
||||
POSTGRES_PASSWORD: evrak_password
|
||||
POSTGRES_DB: evrak
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- evrak-net
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
backend:
|
||||
# Note: 'docker stack deploy' ignores 'build'. You must run 'docker compose build' first.
|
||||
build:
|
||||
context: ../../backend
|
||||
dockerfile: Dockerfile
|
||||
image: evrak-backend:local
|
||||
environment:
|
||||
DB_HOST: postgres
|
||||
DB_PORT: 5432
|
||||
DB_USERNAME: evrak_user
|
||||
DB_PASSWORD: evrak_password
|
||||
DB_DATABASE: evrak
|
||||
PORT: 3000
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
- evrak-net
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ../../frontend
|
||||
dockerfile: Dockerfile
|
||||
image: evrak-frontend:local
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
- evrak-net
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
|
||||
|
||||
networks:
|
||||
evrak-net:
|
||||
driver: overlay
|
||||
attachable: true
|
||||
Reference in New Issue
Block a user