-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (29 loc) · 1022 Bytes
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Docker
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build-containers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and run the container
env:
FASTAPI_SECRET_KEY: ${{secrets.FASTAPI_SECRET_KEY}}
FASTAPI_HASH_ALGORITHM: ${{secrets.FASTAPI_HASH_ALGORITHM}}
ACCESS_TOKEN_EXPIRE_MINUTES: ${{secrets.ACCESS_TOKEN_EXPIRE_MINUTES}}
USER_DB_URL: ${{secrets.USER_DB_URL}}
FILE_DB_URL: ${{secrets.FILE_DB_URL}}
POSTGRES_USER: ${{secrets.POSTGRES_USER}}
POSTGRES_PASSWORD: ${{secrets.POSTGRES_PASSWORD}}
POSTGRES_DB: ${{secrets.POSTGRES_DB}}
NEXT_PUBLIC_ENVIRONMENT: ${{secrets.NEXT_PUBLIC_ENVIRONMENT}}
NEXT_PUBLIC_API_URL: ${{secrets.NEXT_PUBLIC_API_URL}}
run: |
docker-compose -f docker-compose.prod.yml build
sleep 10
docker-compose -f docker-compose.prod.yml up --abort-on-container-exit