-
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 #170 from Northeastern-Electric-Racing/rust-rewrit…
…e-socket
- Loading branch information
Showing
49 changed files
with
2,475 additions
and
355 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,5 +1,5 @@ | ||
# | ||
name: Create and publish a Docker image | ||
name: Create and publish client docker image | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -37,7 +37,7 @@ jobs: | |
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-client | ||
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. | ||
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. | ||
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. | ||
|
@@ -48,7 +48,7 @@ jobs: | |
push: true | ||
target: production | ||
platforms: linux/arm64,linux/amd64 | ||
tags: ${{ steps.meta.outputs.tags }}-angular-client # argos-angular-client | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
# for caching | ||
# cache-from: type=gha,scope=global | ||
|
@@ -59,18 +59,4 @@ jobs: | |
PROD=true | ||
BACKEND_URL=http://192.168.100.1:8000 | ||
MAP_ACCESS_TOKEN=pk.eyJ1IjoibWNrZWVwIiwiYSI6ImNscXBrcmU1ZTBscWIya284cDFyYjR3Nm8ifQ.6TQHlxhAJzptZyV-W28dnw | ||
- name: Build and push Docker image for scylla server | ||
uses: docker/[email protected] | ||
with: | ||
context: ./scylla-server | ||
push: true | ||
target: production | ||
platforms: linux/arm64,linux/amd64 | ||
tags: ${{ steps.meta.outputs.tags }}-scylla-server # argos-scylla-server | ||
labels: ${{ steps.meta.outputs.labels }} | ||
# for caching | ||
# cache-from: type=gha | ||
# cache-to: type=gha,mode=max | ||
# https://github.com/docker/build-push-action/issues/820 | ||
provenance: false | ||
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,57 @@ | ||
# | ||
name: Create and publish scylla docker image | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
|
||
|
||
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. | ||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. | ||
permissions: | ||
contents: read | ||
packages: write | ||
# | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. | ||
- name: Log in to the Container registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels. | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-scylla | ||
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. | ||
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. | ||
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. | ||
- name: Build and push Docker image for scylla server rust | ||
uses: docker/[email protected] | ||
with: | ||
context: ./scylla-server-rust | ||
push: true | ||
platforms: linux/arm64,linux/amd64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
# for caching | ||
# cache-from: type=gha | ||
# cache-to: type=gha,mode=max | ||
# https://github.com/docker/build-push-action/issues/820 | ||
provenance: false | ||
|
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
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,17 @@ | ||
services: | ||
client: | ||
container_name: client | ||
restart: unless-stopped | ||
image: ghcr.io/northeastern-electric-racing/argos-client:rust-rewrite-socket | ||
build: | ||
context: . | ||
args: | ||
PROD: "true" | ||
BACKEND_URL: http://192.168.100.1:8000 | ||
MAP_ACCESS_TOKEN: pk.eyJ1IjoibWNrZWVwIiwiYSI6ImNscXBrcmU1ZTBscWIya284cDFyYjR3Nm8ifQ.6TQHlxhAJzptZyV-W28dnw | ||
target: production | ||
dockerfile: Dockerfile | ||
ports: | ||
- 80:80 | ||
cpu_shares: 512 | ||
mem_limit: 1gb |
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,14 @@ | ||
services: | ||
scylla-server-rust: | ||
environment: | ||
- PROD_SIREN_HOST_URL=siren:1883 | ||
- PROD_SCYLLA=false | ||
|
||
client: | ||
extends: | ||
file: ./angular-client/compose.client.yml | ||
service: client | ||
build: | ||
context: ./angular-client | ||
args: | ||
BACKEND_URL: http://localhost:8000 |
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,16 @@ | ||
services: | ||
scylla-server-rust: | ||
depends_on: | ||
- siren | ||
environment: | ||
- PROD_SIREN_HOST_URL=siren:1883 | ||
|
||
client: | ||
extends: | ||
file: ./angular-client/compose.client.yml | ||
service: client | ||
|
||
siren: | ||
extends: | ||
file: ./siren-base/compose.siren.yml | ||
service: siren |
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,21 @@ | ||
services: | ||
scylla-server-rust: | ||
depends_on: | ||
- siren | ||
environment: | ||
- PROD_SIREN_HOST_URL=siren:1883 | ||
- RUST_LOG=none,scylla_server_rust=DEBUG | ||
|
||
client: | ||
extends: | ||
file: ./angular-client/compose.client.yml | ||
service: client | ||
build: | ||
context: ./angular-client | ||
args: | ||
BACKEND_URL: http://localhost:8000 | ||
|
||
siren: | ||
extends: | ||
file: ./siren-base/compose.siren.yml | ||
service: siren |
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,6 @@ | ||
services: | ||
scylla-server-rust: | ||
environment: | ||
- PROD_SIREN_HOST_URL=host.docker.internal:1883 | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" # for external siren |
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 @@ | ||
services: | ||
odyssey-timescale: | ||
container_name: odyssey-timescale | ||
image: timescale/timescaledb:2.13.1-pg15 | ||
restart: unless-stopped | ||
environment: | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
ports: # needs to be published for charybdis, which runs outside of docker | ||
- 5432:5432 | ||
expose: | ||
- 5432 | ||
volumes: | ||
- db-data:/var/lib/postgresql/data | ||
cpu_shares: 1024 | ||
mem_limit: 3gb | ||
stop_grace_period: 1m | ||
|
||
scylla-server-rust: | ||
container_name: scylla-server-rust | ||
image: ghcr.io/northeastern-electric-racing/argos-scylla:rust-rewrite-socket | ||
build: | ||
context: ./scylla-server-rust | ||
restart: unless-stopped | ||
ports: | ||
- 8000:8000 | ||
depends_on: | ||
- odyssey-timescale | ||
environment: | ||
- SOURCE_DATABASE_URL=postgresql://postgres:password@odyssey-timescale:5432/timescaledb | ||
# - PROD_SIREN_HOST_URL=siren:1883 | ||
- PROD_SCYLLA=true | ||
- RUST_LOG=none,scylla_server_rust=INFO # default log setting for docker | ||
cpu_shares: 1024 | ||
mem_limit: 2gb | ||
stop_grace_period: 10s | ||
stop_signal: SIGINT | ||
init: true | ||
entrypoint: ["./docker_run.sh"] | ||
|
||
|
||
|
||
volumes: | ||
db-data: | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.