Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: use concurrently instead of supervisord #5

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ RUN ./apps/backend/ci/build-app.sh

FROM $NODE_BASE_IMAGE
COPY --from=caddy:2.7.5 /usr/bin/caddy /usr/local/bin/caddy
RUN apt-get update && apt-get install -y --no-install-recommends curl supervisor ca-certificates && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates && rm -rf /var/lib/apt/lists/*
RUN npm install --global concurrently && concurrently --version
RUN useradd -m -u 1001 ryot
WORKDIR /home/ryot
USER ryot
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY config/Caddyfile /etc/caddy/Caddyfile
COPY --from=frontend-builder --chown=ryot:ryot /app/apps/frontend/node_modules ./node_modules
COPY --from=frontend-builder --chown=ryot:ryot /app/apps/frontend/package.json ./package.json
Expand All @@ -57,4 +57,4 @@ COPY --from=frontend-builder --chown=ryot:ryot /app/apps/frontend/public ./publi
COPY --from=app-builder --chown=ryot:ryot /app/ryot /usr/local/bin/ryot
HEALTHCHECK --interval=5m --timeout=3s \
CMD curl -f http://localhost:5000/config || exit 1
CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf" ]
CMD [ "concurrently", "--names", "frontend,backend,proxy", "-k", "npx remix-serve ./build/index.js", "ryot", "caddy run --config /etc/caddy/Caddyfile" ]
2 changes: 1 addition & 1 deletion apps/backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ryot"
version = "4.0.14"
version = "4.0.15"
edition = "2021"
repository = "https://github.com/IgnisDa/ryot"
license = "GPL-V3"
Expand Down
1 change: 1 addition & 0 deletions apps/backend/src/miscellaneous/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2671,6 +2671,7 @@ impl MiscellaneousService {
let many_metadata = Metadata::find()
.select_only()
.column(metadata::Column::Id)
.filter(metadata::Column::IsPartial.eq(false))
.order_by_asc(metadata::Column::LastUpdatedOn)
.into_tuple::<i32>()
.all(&self.db)
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/app/lib/api.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { redirectToQueryParam } from "./generals";
import { createToastHeaders } from "./toast.server";
import { combineHeaders, getLogoutCookies } from "./utilities.server";

export const API_URL = process.env.API_URL;
export const API_URL = process.env.API_URL || "http://localhost:5000";

export const gqlClient = new GraphQLClient(`${API_URL}/graphql`, {
headers: { Connection: "keep-alive" },
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/app/lib/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { $path } from "@ignisda/remix-routes";
import { useMantineTheme } from "@mantine/core";
import { useNavigate, useSearchParams } from "@remix-run/react";
import { useAtom } from "jotai";
import Cookies from "js-cookie";
import { COOKIES_KEYS, getStringAsciiValue } from "./generals";
import { InProgressWorkout, currentWorkoutAtom } from "./workout";
import Cookies from "js-cookie";

export function useGetMantineColor() {
const theme = useMantineTheme();
Expand Down
15 changes: 0 additions & 15 deletions config/supervisord.conf

This file was deleted.