-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (37 loc) · 1.33 KB
/
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
34
35
36
37
38
39
40
41
42
name: Docker
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create .env file
run: |
echo VAR1=${{ secrets.DATABASE }} >> .env
echo VAR2=${{ secrets.OPENAI_API_KEY }} >> .env
echo VAR2=${{ secrets.EMAIL_HOST_DEV }} >> .env
echo VAR2=${{ secrets.EMAIL_PORT_DEV }} >> .env
echo VAR2=${{ secrets.EMAIL_USERNAME_DEV }} >> .env
echo VAR2=${{ secrets.EMAIL_PASSWORD_DEV }} >> .env
echo VAR2=${{ secrets.EMAIL_HOST_PROD }} >> .env
echo VAR2=${{ secrets.EMAIL_PORT_PROD }} >> .env
echo VAR2=${{ secrets.EMAIL_USERNAME_PROD }} >> .env
echo VAR2=${{ secrets.EMAIL_PASSWORD_PROD }} >> .env
echo VAR2=${{ secrets.SECRET_KEY }} >> .env
echo VAR2=${{ secrets.JWT_COOKIE_EXPIRES_IN }} >> .env
echo VAR2=${{ secrets.DEPLOYMENT_URL }} >> .env
echo VAR2=${{ secrets.DEPLOYMENT_KEY }} >> .env
# Add more variables as needed
- name: Run docker-compose
uses: isbang/compose-action@v1.5.1
with:
compose-file: "./docker-compose.yml"
down-flags: "--volumes"
services: |
bookipedia
env-file: .env