This repository has been archived by the owner on Jul 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacm-server.service
65 lines (58 loc) · 1.86 KB
/
acm-server.service
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
[Unit]
Description=Gaia Account Management Server
Documentation=https://github.com/gaia-adm/gaia-account-management-server
After=registrator.service
Wants=registrator.service
[Service]
TimeoutStartSec=20min
TimeoutStopSec=15
KillMode=none
EnvironmentFile=/etc/environment
EnvironmentFile=/etc/env-acm
Restart=on-failure
RestartSec=20s
ExecStartPre=-/usr/bin/docker stop acmserver
ExecStartPre=-/usr/bin/docker rm acmserver
ExecStartPre=/bin/bash -a -c '/usr/bin/docker run \
--rm \
-e DB_HOST=${DB_ALIAS} \
-e DB_DATABASE=hpe_account_management \
-e DB_USER=hpe_account_management \
-e DB_PASSWORD=${ACM_DB_PASSWORD} \
gaiaadm/acmserver:68-master knex migrate:latest --env=production'
ExecStartPre=-/bin/bash -a -c '/usr/bin/docker run \
--rm \
-e DB_HOST=${DB_ALIAS} \
-e DB_DATABASE=hpe_account_management \
-e DB_USER=hpe_account_management \
-e DB_PASSWORD=${ACM_DB_PASSWORD} \
gaiaadm/acmserver:68-master knex seed:run --env=production'
ExecStart=/bin/bash -a -c '/usr/bin/docker run \
--name acmserver \
-p 3100:3000 \
-e DOMAIN=$(systemctl show-environment | grep DOMAIN | cut -d"=" -f2) \
-e DB_HOST=${DB_ALIAS} \
-e DB_DATABASE=hpe_account_management \
-e DB_USER=hpe_account_management \
-e DB_PASSWORD=${ACM_DB_PASSWORD} \
-e BACKEND_HOST=localhost \
-e BACKEND_PORT=3000 \
-e CLIENT_HOST=acmc.${DOMAIN} \
-e CLIENT_PORT=443 \
-e INVITATION_CALLBACK_URL=${INVITATION_CALLBACK_URL} \
-e INVITATION_EMAIL_FROM=${MAILGUN_ACCOUNT} \
-e SMTP_HOST=smtp.mailgun.org \
-e SMTP_USERNAME=${MAILGUN_ACCOUNT} \
-e SMTP_PASSWORD=${SMTP_PASSWORD} \
-e SERVICE_NAME=acmserver \
-e SERVICE_TAGS=master \
-e GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID} \
-e GOOGLE_CLIENT_PASSWORD=${GOOGLE_CLIENT_SECRET} \
-e LOG_LEVEL=DEBUG \
gaiaadm/acmserver:68-master'
ExecStop=/usr/bin/docker stop acmserver
[Install]
WantedBy=multi-user.target
[X-Fleet]
Global=true
MachineMetadata=general=true