Skip to content
Snippets Groups Projects
Commit d42db374 authored by Anze Skulj's avatar Anze Skulj
Browse files

Merge branch 'digital_twin' into 'main'

Digital twin

See merge request !3
parents a0a73864 999a7732
No related branches found
No related tags found
1 merge request!3Digital twin
Pipeline #64310 passed with warnings
......@@ -33,8 +33,6 @@ RUN mix local.hex --force && \
# set build ENV
ENV MIX_ENV="prod"
ENV DATABASE_URL = "ecto://USER:PASS@HOST/DATABASE"
ENV SECRET_KEY_BASE = zYRQiZHSoacOEgsM9w0dW4YgMQeIOrHjlM63tkAdlTlHG6lXiCrkls2TD6khDliA
# install mix dependencies
COPY mix.exs mix.lock ./
......@@ -86,11 +84,20 @@ RUN chown nobody /app
# set runner ENV
ENV MIX_ENV="prod"
#ENV DATABASE_URL="ecto://USER:PASS@HOST/DATABASE"
#ENV SECRET_KEY_BASE=zYRQiZHSoacOEgsM9w0dW4YgMQeIOrHjlM63tkAdlTlHG6lXiCrkls2TD6khDliA
#ENV PHX_SERVER=true
#ENV PHX_HOST="localhost"
#ENV PORT=4000
# Only copy the final release from the build stage
COPY --from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/nemo_cloud_services ./
USER nobody
EXPOSE 4000
# If using an environment that doesn't automatically reap zombie processes, it is
# advised to add an init process such as tini via `apt-get install`
# above and adding an entrypoint. See https://github.com/krallin/tini for details
......
......@@ -60,10 +60,12 @@ if config_env() == :prod do
# Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access.
# See the documentation on https://hexdocs.pm/bandit/Bandit.html#t:options/0
# for details about using IPv6 vs IPv4 and loopback vs public addresses.
ip: {0, 0, 0, 0, 0, 0, 0, 0},
port: port
ip: {0, 0, 0, 0},
port: port,
],
secret_key_base: secret_key_base
secret_key_base: secret_key_base,
server: true,
check_origin: false
# ## SSL Support
#
......
version: '3.8'
services:
nemo_cloud_service:
build: .
container_name: "nemo_cloud_service_app"
# Publish port 4000 directly to your host
ports:
- "4000:4000"
environment:
- PHX_SERVER=true
- PORT=4000
- MIX_ENV=prod
- DATABASE_URL= "ecto://user:pass@localhost/krendb"
- SECRET_KEY_BASE=zYRQiZHSoacOEgsM9w0dW4YgMQeIOrHjlM63tkAdlTlHG6lXiCrkls2TD6khDliA
- PHX_HOST=0.0.0.0
networks:
default:
driver: bridge
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment