Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dreske committed Aug 30, 2021
0 parents commit 86a8391
Show file tree
Hide file tree
Showing 60 changed files with 63,054 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM golang:1.16 as build
WORKDIR /backend/build

RUN apt-get update && apt-get install unzip

# Download and extract liquibase
RUN curl -o flyway-commandline-7.9.1-linux-x64.tar.gz https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/7.9.1/flyway-commandline-7.9.1-linux-x64.tar.gz \
&& tar -xf flyway-commandline-7.9.1-linux-x64.tar.gz \
&& rm flyway-commandline-7.9.1-linux-x64.tar.gz

RUN curl -o vault_1.7.2_linux_386.zip https://releases.hashicorp.com/vault/1.7.2/vault_1.7.2_linux_386.zip \
&& unzip vault_1.7.2_linux_386.zip \
&& rm vault_1.7.2_linux_386.zip

# Compile application
COPY src app
RUN cd app && CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo ./cmd/backend

FROM debian:latest
WORKDIR /opt/backend

# copy app, flyway and vault from previous stage
COPY --from=build /backend/build/app/backend app/
COPY --from=build /backend/build/flyway-7.9.1 flyway
COPY --from=build /backend/build/vault vault

# copy resources
COPY resources/db db/
COPY resources/start.sh .

RUN apt-get update && apt-get install -y ca-certificates && \
chmod +x flyway/flyway && chmod +x start.sh

CMD ["./start.sh"]
12 changes: 12 additions & 0 deletions resources/db/initial/V0.4.1__operators.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('6d06156f-d1cc-11eb-9dd8-98fa9b9d4146', null, 'A1012', 'Davasto', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('0c1ce931-d1ce-11eb-a3e6-98fa9b9d4146', null, 'A1022', 'VentureLeap', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('c6f67a0e-d1c5-11eb-8de5-98fa9b9d4146', null, 'A1004', 'Ecolog', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('a5de189c-d1cc-11eb-9dd8-98fa9b9d4146', null, 'A1014', 'Plattform8', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('421a88c6-d1ce-11eb-a3e6-98fa9b9d4146', null, 'A1024', 'codepiraten', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('9a4e14c9-d1cd-11eb-a3e6-98fa9b9d4146', null, 'A1019', 'TestNOW', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('c89afd3b-d1c9-11eb-9f51-98fa9b9d4146', null, 'A1011', 'Simba N3', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('6db0896d-d1cd-11eb-a3e6-98fa9b9d4146', null, 'A1017', 'Mein-Corona-Schnelltest', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('b5b2c6d5-d1cd-11eb-a3e6-98fa9b9d4146', null, 'A1020', 'IDB-Trade-schnelltest24', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('63cf3b59-d1c9-11eb-9f51-98fa9b9d4146', null, 'A1009', 'DRK-Odenwaldkreis', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('fae97915-d1cf-11eb-a43f-98fa9b9d4146', null, 'A1026', 'TicketIO', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('7d66f391-d1c1-11eb-87ae-98fa9b9d4146', null, 'A1002', 'DM', null, null);
3,318 changes: 3,318 additions & 0 deletions resources/db/initial/V0.4.2__centers.sql

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions resources/db/initial/V1.0.1.1__remove_old.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
delete from centers;
delete from operators;
14 changes: 14 additions & 0 deletions resources/db/initial/V1.0.1.2__operators.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('6d06156f-d1cc-11eb-9dd8-98fa9b9d4146', null, 'A1012', 'Davasto', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('0c1ce931-d1ce-11eb-a3e6-98fa9b9d4146', null, 'A1022', 'VentureLeap', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('c6f67a0e-d1c5-11eb-8de5-98fa9b9d4146', null, 'A1004', 'Ecolog', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('a5de189c-d1cc-11eb-9dd8-98fa9b9d4146', null, 'A1014', 'Plattform8', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('421a88c6-d1ce-11eb-a3e6-98fa9b9d4146', null, 'A1024', 'codepiraten', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('9a4e14c9-d1cd-11eb-a3e6-98fa9b9d4146', null, 'A1019', 'TestNOW', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('6db0896d-d1cd-11eb-a3e6-98fa9b9d4146', null, 'A1017', 'Mein-Corona-Schnelltest', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('b5b2c6d5-d1cd-11eb-a3e6-98fa9b9d4146', null, 'A1020', 'IDB-Trade-schnelltest24', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('63cf3b59-d1c9-11eb-9f51-98fa9b9d4146', null, 'A1009', 'DRK-Odenwaldkreis', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('fae97915-d1cf-11eb-a43f-98fa9b9d4146', null, 'A1026', 'TicketIO', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('7d66f391-d1c1-11eb-87ae-98fa9b9d4146', null, 'A1002', 'DM', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('501b8b42-d356-11eb-8ae8-98fa9b9d4146', null, 'A1005', 'no-Q', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('8ec57057-d4bf-11eb-8660-98fa9b9d4146', null, 'A1042', 'Covisa ', null, null);
INSERT INTO public.operators (uuid, subject, operator_number, name, logo, marker_icon) VALUES ('c89afd3b-d1c9-11eb-9f51-98fa9b9d4146', null, 'A1011', 'Simba N3', null, null);
Loading

0 comments on commit 86a8391

Please sign in to comment.