Skip to content

Commit

Permalink
Create a specific docker-compose file to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sans-arch committed Nov 7, 2023
1 parent 681e1f1 commit 0a3b06f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: Set up Docker Compose
run: |
DOCKER_COMPOSE_IGNORE_ENV_FILE=1 docker-compose up -d
docker-compose -f docker-compose-alternative.yml up -d
- name: Build Docker image
run: docker build -t backend-app .
Expand Down
33 changes: 33 additions & 0 deletions docker-compose.actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: '3.1'

services:
app:
container_name: gamehub-backend-app
build:
context: .
ports:
- '3003:3003'
command:
- sh
- -c
- |
npx prisma generate
npx prisma db push
npm start
depends_on:
- db
db:
image: postgres:latest
restart: always
container_name: gamehub-backend-db
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- ${DB_PORT}:5432
volumes:
- ./docker-app-data-pc-host:/var/lib/postgresql/data

volumes:
docker-app-data-pc-host:

0 comments on commit 0a3b06f

Please sign in to comment.