-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
087ed27
commit a89300d
Showing
4 changed files
with
58 additions
and
56 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
MEILI_MASTER_KEY=your local meili master key but in therory meilisearch can run without master key in development mode | ||
YOUTUBE_API_KEY=useful for scraping youtube videos but the app can run without it | ||
GITHUB_TOKEN=useful for the profile enhancement feature but the app can run without it | ||
RUBYVIDEO_GITHUB_TOKEN=useful for the profile enhancement feature but the app can run without it | ||
|
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,46 @@ | ||
name: deploy to production | ||
|
||
on: | ||
push: | ||
branches: | ||
- ga-mrsk | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
MRSK_REGISTRY_PASSWORD: ${{ secrets.MRSK_REGISTRY_PASSWORD }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2.0 | ||
bundler-cache: true | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Install dependencies | ||
run: gem install mrsk | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.MRSK_REGISTRY_PASSWORD }} | ||
|
||
- name: MRSK deploy | ||
env: | ||
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | ||
MEILI_MASTER_KEY: ${{ secrets.MEILI_MASTER_KEY }} | ||
RUBYVIDEO_GITHUB_TOKEN: ${{ secrets.RUBYVIDEO_GITHUB_TOKEN }} | ||
APPSIGNAL_PUSH_API_KEY: ${{ secrets.APPSIGNAL_PUSH_API_KEY }} | ||
run: mrsk deploy |
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 |
---|---|---|
@@ -1,45 +1,27 @@ | ||
# Name of your application. Used to uniquely configure containers. | ||
service: rubyvideo | ||
|
||
# Name of the container image. | ||
image: adrienpoly/rubyvideo | ||
|
||
# Deploy to these servers. | ||
servers: | ||
- 91.107.208.207 | ||
|
||
# Credentials for your image host. | ||
registry: | ||
# Specify the registry server, if you're not using Docker Hub | ||
# server: registry.digitalocean.com / ghcr.io / ... | ||
username: adrienpoly | ||
|
||
# Always use an access token rather than real password when possible. | ||
password: | ||
- MRSK_REGISTRY_PASSWORD | ||
|
||
# Inject ENV variables into containers (secrets come from .env). | ||
env: | ||
clear: | ||
RAILS_ENV: production | ||
secret: | ||
- RAILS_MASTER_KEY | ||
- APPSIGNAL_PUSH_API_KEY | ||
- MEILI_MASTER_KEY | ||
- GITHUB_TOKEN | ||
# Use a different ssh user than root | ||
- RUBYVIDEO_GITHUB_TOKEN | ||
ssh: | ||
user: root | ||
# Configure builder setup. | ||
# builder: | ||
# args: | ||
# RUBY_VERSION: 3.2.0 | ||
# secrets: | ||
# - GITHUB_TOKEN | ||
# remote: | ||
# arch: amd64 | ||
# host: ssh://[email protected] | ||
volumes: | ||
- "storage:/rails/storage" | ||
# Use accessory services (secrets come from .env). | ||
accessories: | ||
search: | ||
image: getmeili/meilisearch:v1.1 | ||
|
@@ -58,37 +40,11 @@ accessories: | |
- MEILI_MASTER_KEY | ||
volumes: | ||
- "storage:/rails/storage" | ||
# files: | ||
# - config/mysql/production.cnf:/etc/mysql/my.cnf | ||
# - db/production.sql.erb:/docker-entrypoint-initdb.d/setup.sql | ||
# directories: | ||
# - data:/var/lib/mysql | ||
# redis: | ||
# image: redis:7.0 | ||
# host: 192.168.0.2 | ||
# port: 6379 | ||
# directories: | ||
# - data:/data | ||
|
||
# Configure custom arguments for Traefik | ||
# traefik: | ||
# args: | ||
# accesslog: true | ||
# accesslog.format: json | ||
# labels: | ||
# traefik.tcp.routers.other.rule: "HostSNI(`*`)" | ||
# traefik.tcp.routers.other.entrypoints: search | ||
# traefik.tcp.services.other.loadbalancer.server.port: 7700 | ||
# traefik: | ||
# options: | ||
# publish: | ||
# - 80:80 | ||
# - "7700:7700" | ||
# args: | ||
# entrypoints.web.address: ":80" | ||
# entrypoints.otherentrypoint.address: ":7700" | ||
# Configure a custom healthcheck (default is /up on port 3000) | ||
# healthcheck: | ||
# path: /healthz | ||
# port: 4000 | ||
|
||
builder: | ||
args: | ||
RUBY_VERSION: 3.2.0 | ||
RAILS_ENV: production | ||
NODE_VERSION: 19.12.0 | ||
YARN_VERSION: 1.22.19 | ||
multiarch: false |