Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
78efb83
All-in-One
Janmtbehrens May 15, 2025
5b0f643
Implementing and testing Test-Image
Janmtbehrens May 19, 2025
13430d8
Prod as default context & small bug fixes
Janmtbehrens May 22, 2025
a499bbb
Bugfixes and Draft PR
Janmtbehrens May 22, 2025
ba6176d
Bug Fixes
Janmtbehrens Jun 2, 2025
6eabb8e
Removed old Dockerfiles
Janmtbehrens Jun 2, 2025
f3df78c
Dockerfile Linting
Janmtbehrens Jun 3, 2025
0a9514c
Dependabot
Janmtbehrens Jun 5, 2025
b11de7f
Docker Compose Update
Janmtbehrens Jun 10, 2025
64829dc
PR fixes #2
Janmtbehrens Jun 26, 2025
812b6f3
Additional PR fixes
Janmtbehrens Jun 26, 2025
4969e2b
Makefile Rework
Janmtbehrens Jul 1, 2025
f676a81
Expandend run-dev-... matching
Janmtbehrens Jul 3, 2025
66d8790
Adding linting script and reworking test script
Janmtbehrens Jul 3, 2025
e7fda8f
Lint Script
Janmtbehrens Jul 3, 2025
8caff9d
Remove reference to main repository build-service script
Janmtbehrens Jul 8, 2025
c7e2e2a
Remove reference to dev build script from makefile targets
Janmtbehrens Jul 14, 2025
5dec7a6
Merge batch 2
Janmtbehrens Jul 14, 2025
894a541
Fixing lint and test script, updating Makefiles
Janmtbehrens Jul 14, 2025
30794c9
Rename run-dev to dev and run-lint to lin
Janmtbehrens Jul 14, 2025
3148949
Remove PHONY and Target Wildcard to allow autocompletion
Janmtbehrens Jul 15, 2025
fb5cade
Adding PHONY again to support dev target. Revamp make-dev.sh by imple…
Janmtbehrens Jul 15, 2025
e01ab9c
Move dev maketargets from services to main. Expanded make-dev.sh to w…
Janmtbehrens Jul 17, 2025
24f4ef9
Implemented --no-cache flag for docker builds via dev make target
Janmtbehrens Jul 21, 2025
e0c605d
Merge remote-tracking branch 'upstream/main' into makefile-rework
Janmtbehrens Jul 24, 2025
d31af4f
Adding newlines
Janmtbehrens Aug 11, 2025
8f85b7f
Resolve Merge Conflict
Janmtbehrens Aug 19, 2025
1cbd391
Rename as to AS in Dockerfiles
Janmtbehrens Aug 21, 2025
0541ab2
Supress closing container messages and replace complicated local pwd …
Janmtbehrens Sep 9, 2025
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
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG CONTEXT=prod

FROM caddy:2.3.0-alpine as base
FROM caddy:2.3.0-alpine AS base

## Setup
ARG CONTEXT
Expand Down Expand Up @@ -30,17 +30,17 @@ CMD ["./command.sh"]

# Development Image

FROM base as dev
FROM base AS dev

ENV ENABLE_LOCAL_HTTPS=1

# Testing Image

FROM base as tests
FROM base AS tests

# Production Image

FROM base as prod
FROM base AS prod

# Add appuser
RUN adduser --system --no-create-home appuser && \
Expand Down
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
SERVICE=proxy
override SERVICE=proxy

# Build images for different contexts

build-prod:
docker build ./ --tag "openslides-$(SERVICE)" --build-arg CONTEXT="prod" --target "prod"
docker build ./ $(ARGS) --tag "openslides-$(SERVICE)" --build-arg CONTEXT="prod" --target "prod"

build-dev:
./make-localhost-cert.sh
docker build ./ --tag "openslides-$(SERVICE)-dev" --build-arg CONTEXT="dev" --target "dev"
docker build ./ $(ARGS) --tag "openslides-$(SERVICE)-dev" --build-arg CONTEXT="dev" --target "dev"

build-tests:
docker build ./ $(ARGS) --tag "openslides-$(SERVICE)-tests" --build-arg CONTEXT="tests" --target "tests"

build-test:
docker build ./ --tag "openslides-$(SERVICE)-tests" --build-arg CONTEXT="tests" --target "tests"
# Tests

run-tests:
echo "Proxy has no tests"
bash dev/run-tests.sh

lint:
bash dev/run-lint.sh -l
2 changes: 1 addition & 1 deletion dev/command.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

# Same command for all contexts
caddy run --config /etc/caddy/config.json
caddy run --config /etc/caddy/config.json
5 changes: 5 additions & 0 deletions dev/run-lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

echo "########################################################################"
echo "####################### Proxy has no linters ###########################"
echo "########################################################################"
8 changes: 8 additions & 0 deletions dev/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash

set -e

echo "########################################################################"
echo "###################### Proxy has no tests ##############################"
echo "########################################################################"

# Setup
LOCAL_PWD=$(dirname "$0")

# Linters
bash "$LOCAL_PWD"/run-lint.sh