Commit be87a0cd authored by Mauritz, Falk Marius's avatar Mauritz, Falk Marius
Browse files

updated for docker compose

parent 65c94312
Pipeline #5888 failed with stage
in 26 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/
......
......@@ -21,9 +21,9 @@ services:
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
......
......@@ -5,7 +5,7 @@ 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 --release
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; \
......
......@@ -11,7 +11,7 @@ targets:
dart2js_args:
- --minify
- -O2
- -Dhost=http://localhost:8888/
- -Dhost=http://localhost:8888
release_options:
dart2js_args:
- --minify
......
......@@ -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