:whale 🐛 Fix release

This commit is contained in:
mathieu.brunot 2019-02-16 04:20:11 +01:00
parent b2dc669876
commit 1f14cb83b3
No known key found for this signature in database
GPG key ID: 81584BEAF692D7E0
3 changed files with 33 additions and 19 deletions

View file

@ -19,15 +19,6 @@ LABEL maintainer="mathieu.brunot at monogramm dot io"
# Add uxbox as provided by builder # Add uxbox as provided by builder
COPY --from=0 /home/uxbox/backend/dist/uxbox-backend.jar /srv/uxbox/app.jar COPY --from=0 /home/uxbox/backend/dist/uxbox-backend.jar /srv/uxbox/app.jar
VOLUME /srv/uxbox/resources/public
WORKDIR /srv/uxbox/
RUN set -ex; \
mkdir -p /srv/uxbox/resources/public/media; \
mkdir -p /srv/uxbox/resources/public/static;
ENV UXBOX_HTTP_SERVER_DEBUG=false \ ENV UXBOX_HTTP_SERVER_DEBUG=false \
UXBOX_DATABASE_USERNAME=uxbox \ UXBOX_DATABASE_USERNAME=uxbox \
UXBOX_DATABASE_PASSWORD=youshouldoverwritethiswithsomethingelse \ UXBOX_DATABASE_PASSWORD=youshouldoverwritethiswithsomethingelse \
@ -45,6 +36,17 @@ ENV UXBOX_HTTP_SERVER_DEBUG=false \
UXBOX_SMTP_ENABLED=false \ UXBOX_SMTP_ENABLED=false \
UXBOX_SECRET=youshouldoverwritethiswithsomethingelse UXBOX_SECRET=youshouldoverwritethiswithsomethingelse
COPY docker-entrypoint.sh /entrypoint.sh
RUN set -ex; \
chmod 755 /entrypoint.sh; \
mkdir -p /srv/uxbox/resources/public/media; \
mkdir -p /srv/uxbox/resources/public/static;
VOLUME /srv/uxbox/resources/public
WORKDIR /srv/uxbox/
EXPOSE 6060 EXPOSE 6060
ENTRYPOINT ["sh", "/entrypoint.sh"] ENTRYPOINT ["sh", "/entrypoint.sh"]

View file

@ -1,13 +1,14 @@
version: '2' version: '2'
volumes: volumes:
uxbox_front: frontend_data:
uxbox_back: backend_data:
uxbox_db: db_data:
services: services:
db: db:
image: postgres:latest image: postgres:latest
container_name: db
restart: always restart: always
ports: ports:
- "5432:5432" - "5432:5432"
@ -16,11 +17,12 @@ services:
- "POSTGRES_USER=uxbox" - "POSTGRES_USER=uxbox"
- "POSTGRES_PASSWORD=uxbox_postgres_password" - "POSTGRES_PASSWORD=uxbox_postgres_password"
volumes: volumes:
- uxbox_db:/var/lib/postgresql/data - db_data:/var/lib/postgresql/data
backend: uxbackend:
build: ./backend build: ./backend
#image: monogramm/uxbox:backend #image: monogramm/uxbox:backend
container_name: uxbackend
#restart: always #restart: always
depends_on: depends_on:
- db - db
@ -48,14 +50,24 @@ services:
- "UXBOX_SMTP_ENABLED=false" - "UXBOX_SMTP_ENABLED=false"
# Security setup # Security setup
- "UXBOX_SECRET=youshouldoverwritethiswithsomethingelse" - "UXBOX_SECRET=youshouldoverwritethiswithsomethingelse"
volumes:
- /srv/uxbox/backend/resources:/srv/uxbox/resources
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
frontend: uxfrontend:
build: ./frontend build: ./frontend
#image: monogramm/uxbox:frontend #image: monogramm/uxbox:frontend
container_name: frontend
#hostname: uxbox.${DOMAIN}
#restart: always #restart: always
depends_on: depends_on:
- backend - uxbackend
ports: ports:
- 80:80 - 80:80
environment: environment:
- "API_URL=http://127.0.0.1:6060/api" #- "API_URL=http://uxbox.${DOMAIN}/api/"
volumes:
#- /srv/uxbox/frontend/html:/usr/share/nginx/html
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro

View file

@ -3,7 +3,7 @@ upstream backend {
# server api1.my.uxbox.com:3000; # server api1.my.uxbox.com:3000;
# server api1.my.uxbox.com:3001; # server api1.my.uxbox.com:3001;
# server api2.my.uxbox.com:3000; # server api2.my.uxbox.com:3000;
server uxbox_backend:6060; # This is a circular reference that allows docker to start as the example project, it is not recommended to use this in actual development. server uxbackend:6060; # This is a circular reference that allows docker to start as the example project, it is not recommended to use this in actual development.
} }
server { server {