Commit f9eeb584 authored by Siedschlag, Lennart's avatar Siedschlag, Lennart
Browse files

Merge remote-tracking branch 'origin/AqueductBranch' into AqueductBranch

parents 0f5ddfb4 be87a0cd
Pipeline #5897 failed with stage
in 19 seconds
......@@ -4,7 +4,12 @@ services:
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
host: $CAL_DB_HOST
port: $CAL_DB_PORT
username: $CAL_DB_USER
password: $CAL_DB_PASS
databaseName: $CAL_DB_NAME
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
......@@ -12,6 +17,7 @@ before_script:
build:
stage: build
script:
- echo $D_CAL_USER
- docker build -t $IMAGE_TAG frontend/
- docker push $IMAGE_TAG
- docker build -t $IMAGE_TAG-mm middleman/
......
......@@ -5,7 +5,7 @@ services:
build:
context: .
dockerfile: frontend/Dockerfile
dockerfile: frontend/DockerfileCompose
ports:
- "8080:80"
......@@ -15,15 +15,15 @@ services:
image: middleman
build:
context: .
dockerfile: middleman/Dockerfile
dockerfile: middleman/DockerfileCompose
ports:
- "8888:8888"
environment:
- CAL_DB_HOST=postgres
- CAL_DB_PORT=5432
- CAL_DB_USER=cal_user
- CAL_DB_USER=docker
- CAL_DB_NAME=calendar
- CAL_DB_PASS=password
- CAL_DB_PASS=docker
postgres:
image: postgres
......
FROM google/dart:2.2 AS builder
ENV PATH="${PATH}:/root/.pub-cache/bin"
WORKDIR /root/build-here
COPY frontend/pubspec.yaml /root/build-here/
RUN pub get
COPY frontend/ /root/build-here/
RUN pub get
RUN pub run build_runner build --output web:build
FROM nginx
EXPOSE 80
RUN sed -i -e 's, location / {, location /calendar {,g' /etc/nginx/conf.d/default.conf; \
sed -i -e 's, root /usr/share/nginx/html;, alias /usr/share/nginx/html;,g' /etc/nginx/conf.d/default.conf
COPY --from=builder /root/build-here/build /usr/share/nginx/html
FROM google/dart:2.2 AS builder
ENV PATH="${PATH}:/root/.pub-cache/bin"
RUN pub global activate aqueduct
WORKDIR /app
COPY middleman/pubspec.yaml /app/
RUN pub get
COPY middleman/ /app/
RUN pub get
EXPOSE 8888
ENTRYPOINT ["pub", "run", "aqueduct:aqueduct", "serve", "--port", "8888"]
\ No newline at end of file
......@@ -3,7 +3,7 @@ import 'package:middleman/middleman.dart';
Future main() async {
final app = Application<CalenderChannel>()
..options.configurationFilePath = "config.yaml"
..options.port = 8888;
..options.port = int.parse(Platform.environment["port"]);
final count = Platform.numberOfProcessors ~/ 2;
await app.start(numberOfInstances: count > 0 ? count : 1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment