-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from EatPlace/prod
Sync dev with Prod
- Loading branch information
Showing
4 changed files
with
168 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,26 +7,46 @@ on: | |
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
runs-on: self-hosted | ||
steps: | ||
- name: Echo info | ||
run: | | ||
echo "Started deploying..." | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
# - name: Make envfile | ||
# uses: SpicyPizza/[email protected] | ||
# with: | ||
# envkey_MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }} | ||
# envkey_MONGODB_PASSWORD: ${{ secrets.MONGODB_PASSWORD }} | ||
# envkey_RABBIT_PASSWORD: ${{ secrets.RABBIT_PASSWORD }} | ||
# envkey_BOT_NAME: ${{ secrets.BOT_NAME }} | ||
# envkey_BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
# file_name: .env | ||
# directory: "./" | ||
# fail_on_empty: false | ||
# sort_keys: false | ||
- name: Make envfile | ||
uses: SpicyPizza/[email protected] | ||
with: | ||
envkey_JWT_SECRET: ${{ secrets.JWT_SECRET }} | ||
envkey_GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.GOOGLE_OAUTH_CLIENT_ID }} | ||
envkey_GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }} | ||
|
||
envkey_AUTH_TOKEN_EXP: ${{ secrets.AUTH_TOKEN_EXP }} | ||
envkey_RESET_PASSWORD_TOKEN_EXP: ${{ secrets.RESET_PASSWORD_TOKEN_EXP }} | ||
envkey_VERIFY_TOKEN_EXP: ${{ secrets.VERIFY_TOKEN_EXP }} | ||
|
||
envkey_POSTGRES_USER: ${{ secrets.POSTGRES_USER }} | ||
envkey_POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | ||
envkey_POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }} | ||
envkey_POSTGRES_PORT: ${{ secrets.POSTGRES_PORT }} | ||
envkey_POSTGRES_DB: ${{ secrets.POSTGRES_DB }} | ||
|
||
envkey_REDIS_HOST: ${{ secrets.REDIS_HOST }} | ||
envkey_REDIS_PORT: ${{ secrets.REDIS_PORT }} | ||
envkey_REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }} | ||
|
||
envkey_SITE_DOMAIN: ${{ secrets.SITE_DOMAIN }} | ||
envkey_SECURE_COOKIES: ${{ secrets.SECURE_COOKIES }} | ||
|
||
envkey_SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | ||
|
||
envkey_CORS_HEADERS: ${{ secrets.CORS_HEADERS }} | ||
envkey_CORS_ORIGINS: ${{ secrets.CORS_ORIGINS }} | ||
|
||
envkey_ENVIRONMENT: PRODUCTION | ||
|
||
file_name: .prod.env | ||
directory: "./" | ||
fail_on_empty: false | ||
sort_keys: false | ||
|
||
- name: pull images | ||
run: docker-compose -f docker-compose.prod.yml pull | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
version: '3.8' | ||
|
||
services: | ||
db: | ||
container_name: db | ||
hostname: db | ||
image: library/postgres:14.1 | ||
|
||
environment: | ||
- POSTGRES_USER=${POSTGRES_USER} | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
- POSTGRES_DB=${POSTGRES_DB} | ||
volumes: | ||
- eat_place_pg_data:/var/lib/postgresql/data | ||
ports: | ||
- "5432:5432" | ||
|
||
test_db: | ||
container_name: test_db | ||
hostname: test_db | ||
image: library/postgres:14.1 | ||
|
||
environment: | ||
- POSTGRES_USER=rest | ||
- POSTGRES_PASSWORD=rest | ||
- POSTGRES_DB=rest | ||
volumes: | ||
- eat_place_test_pg_data:/var/lib/postgresql/data | ||
ports: | ||
- "5433:5432" | ||
|
||
redis: | ||
image: redis:6.2-alpine | ||
hostname: redis | ||
container_name: redis | ||
env_file: | ||
- .env | ||
command: | ||
- /bin/sh | ||
- -c | ||
- redis-server --requirepass "$${REDIS_PASSWORD:?REDIS_PASSWORD variable is not set}" | ||
ports: | ||
- 6379:6379 | ||
|
||
|
||
rest_api: | ||
image: timofeytst/eat-place:rest_api_dev | ||
ports: | ||
- "8000:8000" | ||
restart: always | ||
|
||
env_file: | ||
- .env | ||
depends_on: | ||
- db | ||
- redis | ||
|
||
web_ui: | ||
image: timofeytst/eat-place:web_ui_dev | ||
ports: | ||
- "3000:3000" | ||
restart: always | ||
environment: | ||
REACT_APP_DEV: dev | ||
depends_on: | ||
- rest_api | ||
|
||
volumes: | ||
eat_place_pg_data: | ||
driver: "local" | ||
|
||
eat_place_test_pg_data: | ||
driver: "local" | ||
|
||
networks: | ||
default: | ||
external: true | ||
name: eat_place |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters