-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
66 lines (66 loc) · 2.13 KB
/
docker-compose-dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: "3"
services:
postgres:
image: postgres:latest
ports:
- "${EXPOSED_CONTAINER_TYPEORM_PORT}:${TYPEORM_PORT}"
environment:
POSTGRES_PASSWORD: ${TYPEORM_PASSWORD}
volumes:
- ./docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
networks:
- backend
redis:
image: redis:latest
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- "${EXPOSED_CONTAINER_REDIS_PORT}:${REDIS_PORT}"
networks:
- backend
rust-api-base:
build:
context: ./
dockerfile: Dockerfile.dev
environment:
PORT: "${PORT}"
JWT_SECRET: "${JWT_SECRET}"
TYPEORM_TYPE: "${TYPEORM_TYPE}"
TYPEORM_HOST: "${TYPEORM_HOST}"
TYPEORM_USERNAME: "${TYPEORM_USERNAME}"
TYPEORM_PASSWORD: "{TYPEORM_PASSWORD}"
TYPEORM_DATABASE: "${TYPEORM_DATABASE}"
TYPEORM_PORT: "${TYPEORM_PORT}"
TYPEORM_SYNCHRONIZE: "true"
TYPEORM_LOGGING: "true"
TYPEORM_MIGRATIONS_RUN: "${TYPEORM_MIGRATIONS_RUN}"
REDIS_PORT: "${REDIS_PORT}"
REDIS_PASSWORD: "${REDIS_PASSWORD}"
REDIS_HOST: "${REDIS_HOST}"
ACCESS_TOKEN_LIFE: "${ACCESS_TOKEN_LIFE}"
RATE_LIMIT_WINDOW: "${RATE_LIMIT_WINDOW}"
RATE_LIMIT_MAX_REQUESTS: "${RATE_LIMIT_MAX_REQUESTS}"
TRUSTED_REGISTRIES: "${TRUSTED_REGISTRIES}"
TRUSTED_REGISTRIES_INDEX_PUBLIC_KEYS_TO_EXPOSE: "${TRUSTED_REGISTRIES_INDEX_PUBLIC_KEYS_TO_EXPOSE}"
EXTERNAL_SOURCE_1: "${EXTERNAL_SOURCE_1}"
RPC_CONNECTION_648540: "${RPC_CONNECTION_648540}"
DATABASE_URL: "postgres://${TYPEORM_USERNAME}:${TYPEORM_PASSWORD}@${TYPEORM_HOST}:${TYPEORM_PORT}/${TYPEORM_DATABASE}" #default connection
ports:
- "${EXPOSED_CONTAINER_SERVER_PORT}:${PORT}"
restart: on-failure
container_name: lacpass-trusted-list
depends_on:
- postgres
- redis
links:
- postgres
- redis
volumes:
- ".:/usr/src/lacpass-trusted-list"
- ".env.dev:/app/.env.dev"
command: bash -c "RUST_LOG='debug,tower_http=trace' && cargo watch -x run"
networks:
- backend
networks:
backend:
name: backend
external: true